Mirroring from GitHub. How to Auth

Hello,
I’m trying to find mirror a repo from github to scm. I’ve tried the mirror plugin but since github does not allow basic auth anymore, the plugin does not seem like would work for this task.
I’ve tried converting my private ssh key to p12 and using it that way, but that does not seem to work.
Is there a possibility to add ssh mirroring option, or https with token or gpg auth?

Hey, the mirror plugin can work with GitHub. You have to create and use a personal API token.

Anything more specific, on how it can work ?
If I setup basic auth with username and use the personal API Token as the password (the way the documentation shows), I’m getting an exception from jgit:
2023-08-03 13:22:29.038 [pool-6-thread-3] [ ] INFO sonia.scm.repository.spi.GitMirrorCommand - got exception while trying to synchronize mirror for repository git/testmirror (1yTltLJAGbm)
org.eclipse.jgit.api.errors.TransportException: https://URLXXXXXX/YYYY.git: git-upload-pack not permitted on ‘https://URLXXXXXX/YYYY.git/
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:224)
at sonia.scm.repository.spi.GitMirrorCommand$Worker.doUpdate(GitMirrorCommand.java:201)
at sonia.scm.repository.spi.GitMirrorCommand$Worker.run(GitMirrorCommand.java:190)
at sonia.scm.repository.spi.GitMirrorCommand$Worker.run(GitMirrorCommand.java:161)
at sonia.scm.repository.spi.AbstractGitCommand.inClone(AbstractGitCommand.java:138)
at sonia.scm.repository.spi.GitMirrorCommand.update(GitMirrorCommand.java:145)
at sonia.scm.repository.api.MirrorCommandBuilder.update(MirrorCommandBuilder.java:134)
at com.cloudogu.scm.mirror.MirrorCommandCaller.call(MirrorCommandCaller.java:86)
at com.cloudogu.scm.mirror.MirrorWorker.startSynchronously(MirrorWorker.java:149)
at com.cloudogu.scm.mirror.MirrorWorker.lambda$startAsynchronously$4(MirrorWorker.java:136)
at sonia.scm.web.security.DefaultAdministrationContext.runAsAdmin(DefaultAdministrationContext.java:83)
at com.cloudogu.scm.mirror.TaskDecoratorFactory.lambda$asAdmin$1(TaskDecoratorFactory.java:59)
at com.cloudogu.scm.mirror.TaskDecoratorFactory.lambda$withTryCatch$0(TaskDecoratorFactory.java:51)
at com.cloudogu.scm.mirror.MirrorWorker.lambda$startAsynchronously$5(MirrorWorker.java:136)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.eclipse.jgit.errors.TransportException: https://URLXXXXXX/YYYY.git: git-upload-pack not permitted on ‘https://URLXXXXXX/YYYY.git/
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:692)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:465)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:151)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:103)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1321)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:213)
… 19 common frames omitted

I reproduced your case. First i tried to import a private GitHub repository using a fine-grained token with the required permissions. This did not work…

Afterwards i tried the same with a classic token with full repo permissions and works like a charm. I don’t know why the first attempt failed. Could you also try the classic token? I set the classic token as my password on the SCM import form.