Suppose a spacecraft is orbiting around a planet with no atmosphere, a perfect spherically symmetric mass distribution, such that the gravitational field can be expressed as that of a point at the origin using Newton's Shell theorem, and there are no other forces or bodies in the universe.
A repeat ground track will occur only when the ratio of the rotation periods of the planet and spacecraft is a rational number, i.e. the ratio of two integers.
Then the period of a repeat ground track will be the shorter of the two periods times the larger of the two integers, or vice versa. A simple way to think about this is to just imagine the moment the satellite crosses the equator, or passes x=0 (asuming z is the rotation axis of the planet). You have to be a little careful with your imagination if it's a purely polar orbit, but the same math works.
For example, say the planet rotates every 1440 minutes, and the satellite orbits around it in space with a period of 115.2 minutes.
Find the integers $m, n$ such that
$m \times 1440 - n \times 115.2 = 0$
The solution would be $m, \ n = 2, \ 25$, and so the period would be two days, or $2 \times 1444$ or $25 \times 115.2$ minutes.
If there is no exact solution for two integers, then there is no exact repeat ground track!
The real world:
The Earth's gravity field is lumpy, so circular or pure Kepler elliptical orbits don't really exist in nature. There are gravitational effects from the Moon and the Sun, and drag effects from the atmosphere in LEO.
So "never" is the short answer.
Here is a GIF of an animation I once made of a hypothetical ground track of a satellite in a similar to the ISS for example. I used math from the Technical Details subsection Wikipedia article Sun-synchronous_orbit including the precession of the nodes due to Earth's oblateness. It's a simple calculation and does not include many effects
I calculated for 15,00,000 seconds (about 17 days).
While there are certain altitudes that create an apparent repeat ground track for a short time, it's just an illusion.
See also this answer to the question How long does it take for ISS to travel over all possible places of the world one time? for more to think about.
below: low res GIF of snippet of a simple animation I once made of a ground track for ~17 days of a circular orbit of varying altitude, includes precession of nodes due to J2.
For fun, here's how to do it in Python. Skyfield introduced a
.subpoint() method in version 1.3 (it's now at 1.4) so getting the ground track of satellites is easy!
Here is the ground track of the ISS for the first seven days of June 2018:
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos, EarthSatellite
TLE = """1 25544U 98067A 18157.92534723 .00001336 00000-0 27412-4 0 9990
2 25544 51.6425 69.8674 0003675 158.7495 276.7873 15.54142131116921"""
L1, L2 = TLE.splitlines()
load = Loader('~/Documents/fishing/SkyData') # avoids multiple copies of large files
ts = load.timescale()
data = load('de421.bsp')
earth = data['earth']
ts = load.timescale()
minutes = np.arange(60. * 24 * 7) # seven days
time = ts.utc(2018, 6, 1, 0, minutes) # start June 1, 2018
ISS = EarthSatellite(L1, L2)
subpoint = ISS.at(time).subpoint()
lon = subpoint.longitude.degrees
lat = subpoint.latitude.degrees
breaks = np.where(np.abs(lon[1:]-lon[:-1]) > 30) #don't plot wrap-around
lon, lat = lon[:-1], lat[:-1]
lon[breaks] = np.nan