Closed RareScrap closed 8 months ago
This fixes by providing .ssh/config
file with the key:
# GitLab (Required by fastback minecraft mod)
Host gitlab.com
HostName gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/fastback-ssh-key
But there is no mention of it in wiki
Also, it's really strange that exceptions comes from the org.eclipse.jgit
package. It seems not to happen because native git must be used as said in wiki:
If you already have git and git-lfs installed, native support will be enabled automatically when you run
/backup init
. -- Fastback wiki - How to Enable Native Git Support
Issue description
/backup full
fails to push a branch to remote if the key was added withssh-add
command.Steps to reproduce the issue
fastback-0.16.2+1.20.2-fabric.jar
fabric-api-0.90.0+1.20.2.jar
ssh-keygen -t ed25519 -f ~/.ssh/fastback-ssh-key
eval $(ssh-agent)
and thessh-add ~/.ssh/fastback-ssh-key
/backup init
backup set remote-url git@<SOME_STUFF>.git
/backup full
Expected result
Actual result
org.eclipse.jgit.api.errors.TransportException: git@<SOME_STUFF>.git: Cannot log in at YOUR_GIT_SERVER_PROVIER.com:22 publickey: no keys to try
Additional details / screenshots
Full log
``` backup full [16:50:53] [Server thread/INFO]: Saving world before backup... [16:50:53] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [16:50:53] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [16:50:53] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [16:50:53] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved [16:50:53] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [16:50:53] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [16:50:53] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved [16:50:53] [Server thread/INFO]: Backing up... [16:50:53] [pool-3-thread-2/INFO]: The server is starting a backup. [16:50:53] [pool-3-thread-2/INFO]: Creating backup snapshot 2023-10-09_16-50-53 [16:50:54] [pool-3-thread-2/INFO]: getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider [16:50:54] [pool-3-thread-2/INFO]: No detected/configured IoServiceFactoryFactory; using Nio2ServiceFactoryFactory [16:50:55] [pool-3-thread-2/INFO]: Local backup succeeded but remote backup failed. See log for details. [16:50:55] [pool-3-thread-2/ERROR]: org.eclipse.jgit.api.errors.TransportException: git@gitlab.com:RareScrap/del21312.git: Cannot log in at gitlab.com:22 publickey: no keys to try java.io.IOException: org.eclipse.jgit.api.errors.TransportException: git@gitlab.com:RareScrap/del21312.git: Cannot log in at gitlab.com:22 publickey: no keys to try at net.pcal.fastback.repo.PushUtils.doPush(PushUtils.java:120) ~[fastback-0.16.2+1.20.2-fabric.jar:?] at net.pcal.fastback.repo.RepoImpl.doCommitAndPush(RepoImpl.java:104) ~[fastback-0.16.2+1.20.2-fabric.jar:?] at net.pcal.fastback.commands.FullCommand.lambda$run$1(FullCommand.java:65) ~[fastback-0.16.2+1.20.2-fabric.jar:?] at net.pcal.fastback.commands.Commands.lambda$gitOp$0(Commands.java:125) ~[fastback-0.16.2+1.20.2-fabric.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: org.eclipse.jgit.api.errors.TransportException: git@gitlab.com:RareScrap/del21312.git: Cannot log in at gitlab.com:22 publickey: no keys to try at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:192) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-a2ec4fe238df27f1.jar:?] at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:131) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-a2ec4fe238df27f1.jar:?] at net.pcal.fastback.repo.PushUtils.doPush(PushUtils.java:87) ~[fastback-0.16.2+1.20.2-fabric.jar:?] ... 8 more Caused by: org.eclipse.jgit.errors.TransportException: git@gitlab.com:RareScrap/del21312.git: Cannot log in at gitlab.com:22 publickey: no keys to try at org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:182) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-5f19e0b51990461d.jar:?] at org.eclipse.jgit.transport.sshd.SshdSession.connect(SshdSession.java:101) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-5f19e0b51990461d.jar:?] at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:258) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-5f19e0b51990461d.jar:?] at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:1) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-5f19e0b51990461d.jar:?] at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:107) ~[org_eclipse_jgit_org_eclipse_jgi309050840-r-a2ec4fe238df27f1.jar:?] at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.