Skip to content

Can't perform a push, pull or fetch, regardless of branch and remote. #299

Open

Description

@Drywtler

I'm very new to Git and GitHub, and I don't know where else to find help besides bothering the dev via their socials, I prefer not doing that.

I can see, create and remove all the branches and remotes from within the Godot editor, but I cannot perform a push, pull or fetch.

If I try to perform any of those commands on origin I get:
ERROR: core/variant/variant_utility.cpp:1098 - GitPlugin: 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 -17: the SSL certificate is invalid in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_push#L533
If I try to do it on another remote I get:
ERROR: core/variant/variant_utility.cpp:1098 - GitPlugin: Could not connect to remote "prueba1". Are your credentials correct? Try using a PAT token (in case you are using Github) as your password. Error -17: invalid or unknown remote ssh hostkey in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_fetch#L411

I did all the steps required to connect my Godot project to my repo. I made a PAT and put it on the password field.
The PAT has the following permissions as suggested by this comment on the godot engine tutorial docs regarding VCS:

  • Repository permissions (Read/Write): Actions, Adminstration, Codespaces, Contents, Issues, Merge, Pull requests
  • Account permissions (Read): Git SSH keys, SSH signing keys.

Perhaps the SSH key is not effective since I added it to my account as an Authentication Key rather than a Signing Key, and maybe it lacks permissions too. But then again I am very new to this, so I could be missing some fundamentals.

If it is important to mention: my OS is Windows 11 Pro, I am on Godot v4.4.stable.official [4c311cbee] and using version 3.2.0 of the plugin.

Activity

  1. Calinou commented on Aug 18, 2025

    @Calinou
    Member
  2. AdVurt commented on Sep 18, 2025

    @AdVurt

    Hi @Calinou,
    I've installed it myself to check as I have also been experiencing this bug. Sadly it hasn't resolved it for me, I just attempted a push and got this:
    GitPlugin: Performing push to origin
    ERROR: core/variant/variant_utility.cpp:1024 - GitPlugin: 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 -17: the SSL certificate is invalid in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_push#L533

  3. theDoktorJ commented on Sep 20, 2025

    @theDoktorJ

    I don't mean to hijack this, but I just wanted to say that I finally got SSH authentication to work with this plugin. I had to go through and reconfigure everything after upgrading to 3.2.1, but it works now. Here is what I did:
    Upgraded to 3.2.1 and got it working with PAT token first.
    ssh-keygen -t rsa -b 4096 -C "[email protected]"
    git config --global user.email "[email protected]"
    git config --global user.name "name"
    git remote rm origin
    git remote add origin [email protected]:username/repo.git
    ssh-add /home/username/.ssh/id_rsa
    I also had to create ~/.ssh/config and added the following information into it:
    Host host.tld
    Hostname host.tld
    IdentityFile ~/.ssh/id_rsa

    IdentitiesOnly yes

    I then added my public key to my git hosts interface.

    That got it working via command line, then I went in the version control settings in godot and added email in the username field
    I set SSH Public key path and private key path and the ssh password. That got it working, at least for me.
    I hope this helps.

  4. paddomanno commented on Jul 21, 2026

    @paddomanno

    I was able to resolve this issue by creating a new SSH key with the PEM format.

    Steps:

    1. Create the key
      ssh-keygen -t rsa -b 4096 -m PEM -f ~/.ssh/id_rsa_godot -N ""
      -t rsa -b 4096 — RSA key, 4096 bits
      -m PEM — forces the old PEM format libssh2 needs (instead of the new OpenSSH default format)
      -f ~/.ssh/id_rsa_godot — filename to keep it separate from your existing keys
      -N "" — empty passphrase, so the plugin can use it without a prompt
    2. Add the contents of id_rsa_godot.pub to your Git host
    3. In the Godot Git plugin settings, point the SSH private/public key fields at the full absolute paths of these new files (not ~, the real expanded path).
    4. Try pushing again.

    This fixed the issue for me.

    full disclosure: I found the fix using Claude. To quote:

    Since OpenSSH 7.8, ssh-keygen generates keys in the new OpenSSH format by default. The libssh2 version bundled with the Godot git plugin often can't parse this format — it expects the older PEM format. This produces exactly that "Failed to retrieve list of SSH authentication methods" error, because libssh2 fails silently on the key before it even gets to try authenticating.

  5. Calinou commented on Oct 21, 2026

    @Calinou
    Member
  6. loimabean commented on Oct 22, 2026

    @loimabean

    3.3.0 does not resolve it for me. Godot 4.7.2.stable, plugin version 3.3.0, Linux (Fedora Workstation 44)

    I use a passphrase-protected SSH key to auth into GitHub, which I have put all the information for into the Version Control Settings dialog. I have a private GitHub repository for my project. Pushing, pulling, and fetching does not work for me or any of my teammates. The timeout is very long as well (takes about a minute for it to fail after attempting an operation)

    GitPlugin: Loaded system CA certificates
    GitPlugin: Performing pull from origin
    ERROR: GitPlugin: 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: remote rejected authentication: Failed getting response in godot-git-plugin/src/git_plugin.cpp:_pull#L438
       at: push_error (core/variant/variant_utility.cpp:1023)
    
  7. Faless commented on Oct 24, 2026

    @Faless
    Contributor

    This is most likely a UX issue. As you can see, the issue contains multiple reports of different setups and different errors.

    As far as I can tell this boils down two 3 main issues:

    • The remote is setup with an HTTPS url, but you are trying to use an SSH key (which you can't)
    • The remote is setup with an SSH url, but you are trying to use an username/password (which you also can't, at least on github)
    • Either the SSH password or the username/password are incorrect.

    Then the connection takes a really long time failing because libgit is designed to keep asking for new credentials if one fails (you are expected to prompt the user like git itself does, then the user can cancel).
    To fix this, the plugin needs quite some work, AFAIU, moving Git ops on a thread, blocking in credentials_cb, prompt the user for credentials, then unblocking credentials_cb with the new credentials or a cancel message.

  8. xanat0s commented on Nov 1, 2026

    @xanat0s

    v3.3.0 also fails for me in Godot 4.7.1.stable.mono.official. The editor hangs.

    v3.2.1 was working in my previous project, so I reverted to that version and it functions fine.

  9. NikHru commented on Nov 15, 2026

    @NikHru

    3.3.0 does not resolve it for me. Godot 4.7.2.stable, plugin version 3.3.0, Linux (Fedora Workstation 44)

    I use a passphrase-protected SSH key to auth into GitHub, which I have put all the information for into the Version Control Settings dialog. I have a private GitHub repository for my project. Pushing, pulling, and fetching does not work for me or any of my teammates. The timeout is very long as well (takes about a minute for it to fail after attempting an operation)

    GitPlugin: Loaded system CA certificates
    GitPlugin: Performing pull from origin
    ERROR: GitPlugin: 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: remote rejected authentication: Failed getting response in godot-git-plugin/src/git_plugin.cpp:_pull#L438
       at: push_error (core/variant/variant_utility.cpp:1023)
    

    @loimabean
    I have the same exact thing, only difference is that its Windows 11, have you found any fix to your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions