godot-git-plugin icon indicating copy to clipboard operation
godot-git-plugin copied to clipboard

Can't push with SSH

Open LennyPhoenix opened this issue 3 years ago • 6 comments

Attempting to push using SSH leads to the following error in console after about a minute of unresponsiveness.

ERROR: GitAPI: Could not connect to remote "origin". Are your credentials correct? Try using a PAT token (in case you are using Github) as your password. Error -1: failed to connect to github.com: Network is unreachable
   at: _push (godot-git-plugin/src/git_api.cpp:562)

LennyPhoenix avatar Aug 12 '22 15:08 LennyPhoenix

Godot 3.5, Linux

Here is my VCS config:

VCS Settings

LennyPhoenix avatar Aug 12 '22 15:08 LennyPhoenix

@LennyPhoenix Could you try to run ssh -Tv [email protected] on your CLI to test if your SSH access to Github is in good condition?

twaritwaikar avatar Aug 12 '22 15:08 twaritwaikar

Sure, but I haven't had any problems with Git in other projects so I'm not sure that would be the problem. I'll check in a minute once I get home just in case its something silly like that.

LennyPhoenix avatar Aug 12 '22 15:08 LennyPhoenix

Hi LennyPhoenix! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2104, received 2344 bytes, in 0.2 seconds
Bytes per second: sent 8511.9, received 9482.9
debug1: Exit status 1

Looks fine to me, cloning a repository from the command line (this one to be exact) yields a normal result:

❯ git clone [email protected]:godotengine/godot-git-plugin.git
Cloning into 'godot-git-plugin'...
remote: Enumerating objects: 7890, done.
remote: Counting objects: 100% (814/814), done.
remote: Compressing objects: 100% (334/334), done.
remote: Total 7890 (delta 449), reused 766 (delta 419), pack-reused 7076
Receiving objects: 100% (7890/7890), 248.83 MiB | 4.04 MiB/s, done.
Resolving deltas: 100% (1402/1402), done.

Pushing and pulling from the command line also works as expected.

LennyPhoenix avatar Aug 12 '22 15:08 LennyPhoenix

I am also getting this same error message when I click the "sync" button at the bottom of the "commit tab"

Could not connect to remote "origin". Are your credentials correct? Try using a PAT token (in case you are using Github) as your password. Error -16: Failed to retrieve list of SSH authentication methods: Failed getting response

I am not using Github but SSH to a local server.

I can do a git push just fine from the command line: I had manually done

  • git remote add origin git@:
  • git push --set-upstream origin master

I was just trying to see how the plugin handled a push.

I am using 3.5 and 2.1.0 of the plugin

markeel avatar Aug 15 '22 16:08 markeel

I'm having the same error as @markeel . What's interesting is that when I generate the PAT token at first it works fine for me, but after a few pushes to my remote repository it gives me the same error, when nothing really changed. when I make a new PAT token, everything works again, but again after a few pushes it gives me the same error.

any other solution outside of godot works fine(git CLI, sourcetree, github desktop etc)

fkeyzuwu avatar Sep 04 '22 17:09 fkeyzuwu

Same issue here trying to push to Bitbucket. I've run ssh -T [email protected] and I get "authenticated via ssh key. You can use git to connect to Bitbucket. Shell access is disabled." So I'm confident that my connection to Bitbucket is good. I get the same message as @markeel when I try to push.

Using Godot 3.5.1 and the 2.1.0 version of the godot-git-plugin plugin.

curtking avatar Jan 16 '23 10:01 curtking

Chiming in here to report that this bug still exists. I'm using Godot 4.0.1-stable and v3.0 of the plugin. Not sure what other details to provide, I've confirmed my connection to github is fine, I can push just fine from the command line as well as other tools. Very mysterious!

BenNicholls avatar Mar 23 '23 19:03 BenNicholls

BTW I opened a new issue: #172 with a potential fix that may be related to this issue.

markeel avatar Mar 24 '23 22:03 markeel

Closing in favor of https://github.com/godotengine/godot-git-plugin/issues/193, which is more detailed. As a workaround, use a RSA key instead of ED25519.

Other issues reported in comments are likely a duplicate of https://github.com/godotengine/godot-git-plugin/issues/99 and/or https://github.com/godotengine/godot-git-plugin/issues/146.

Calinou avatar Jul 09 '23 14:07 Calinou