Skip to content

Plugin not working with Github on Godot 4.0-beta10 #145

Closed

Description

@ianling

The 3.0.0-beta1 release of this plugin with support for Godot 4.0 does not work for me. My repo is on Github. Using a PAT gives the following error:

core/variant/variant_utility.cpp:880 - 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 -1: Failed to authenticate SSH session: Unable to open public key file in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_fetch#L411

If I change to using PEM public/private keys, I get this error:

core/variant/variant_utility.cpp:880 - 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: Failed to retrieve list of SSH authentication methods: Failed getting response in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_fetch#L411

Activity

  1. twaritwaikar commented on Jan 3, 2023

    @twaritwaikar
    Contributor

    Could you send us the output of git remote -v? If you are working with a private repository, please redact the repo names if you want to.

    Also, ls -la ~/.ssh/id_rsa.pub will help see if the public key has the proper permissions.

  2. twaritwaikar commented on Jan 3, 2023

    @twaritwaikar
    Contributor

    If you can post the public key path mentioned in Godot, that will also help

  3. ianling commented on Jan 3, 2023

    @ianling
    ContributorAuthor
    $ git remote -v
    origin  [email protected]:ianling/xxxxx.git (fetch)
    origin  [email protected]:ianling/xxxxx.git (push)
    

    I am on Windows 10, and my SSH key is in my user directory and has the proper permissions. It also works fine outside of Godot, I can push to Github via CLI. C:\Users\Ian\.ssh\id_rsa.pub

  4. ianling commented on Jan 3, 2023

    @ianling
    ContributorAuthor

    To clarify, I was getting the error about not being able to read the public key when I was using a PAT, so the public key box in Godot was empty.

  5. twaritwaikar commented on Jan 3, 2023

    @twaritwaikar
    Contributor

    To clarify, I was getting the error about not being able to read the public key when I was using a PAT, so the public key box in Godot was empty.

    I think that explains that particular error message. Since your remote is an SSH remote (identifiable due to the [email protected]), the plugin will try to log into your Git remote using SSH and for those, it would try to use your SSH credentials, the paths to which happen to be empty. Maybe we can make the error message a bit clear to let you know that the SSH paths are empty.

    The issue however, still remains on why it couldn't find any SSH auth methods

  6. ianling commented on Jan 3, 2023

    @ianling
    ContributorAuthor

    Ahhhh, that makes sense, didn't occur to me that you can't use a PAT for SSH authentication.

    I've tried keys in both the old -----BEGIN RSA PRIVATE KEY----- format and the newer -----BEGIN OPENSSH PRIVATE KEY----- format, both produce the same error about SSH auth methods.

  7. ianling commented on Jan 3, 2023

    @ianling
    ContributorAuthor

    If I generate a new set of keys using ssh-keygen -m PEM -t rsa, it almost works, but Github no longer allows using RSA keys with SHA-1 during the initial SSH handshake:

    core/variant/variant_utility.cpp:880 - 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 -20: ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
      Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
      
       in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_fetch#L411
    
  8. ianling commented on Jan 3, 2023

    @ianling
    ContributorAuthor

    This is due to an issue in libssh2 that was resolved here: libssh2/libssh2#626

    This Godot plugin uses an older commit of libssh2, so it does not have the fix for this issue. Would it be possible to pull in a newer version of libssh2?

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