repositories: allow repo mirror to use tokens
I've had one of my repos mirroring to github, until it didn't. I started investigating the why when I wanted to do the same with a second repository.
I'm using the "https://" URL from Github. The only authentication option is "Password". Mirroring fails altogether with "Invalid username or password". However, I think that the real reason that happens is because your HTTP uses basic auth to access the Github API, and I have 2-factor enabled, so that can't be done. Actually, I'm almost sure that the reason mirroring stopped working for my other repo was because I enabled 2FA.
Github allows one to generate tokens to be used in API calls. I'd say that allowing this authentication method would make it work.
issue