Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cred.sshKeyNew not working: Too many redirects or authentication replays #511

Copy link
Copy link
@dcodeIO

Description

@dcodeIO
Issue body actions

Hello everyone,

I am trying to automate pushing to a GitHub repository using NodeGit.Cred.sshKeyNew, but it looks like I am not able to get this working somehow. NodeGit.Cred.userpassPlaintextNew works just fine.

This is what I have:

}).then(function(remoteResult) {
    remote = remoteResult;
    remote.setCallbacks({
        credentials: function(url, userName) {
            return nodegit.Cred.sshKeyNew(
                userName,
                path.join(__dirname, "..", "..", "data", "mykey-rsa.pub"),
                path.join(__dirname, "..", "..", "data", "mykey-rsa"),
                "myPass"
            );
        }
    });
    return remote.connect(nodegit.Enums.DIRECTION.PUSH);
})

Which always results in: Error: Too many redirects or authentication replays.

I did double check that:

  • paths to the public and private key files are correct
  • the key is properly installed on GitHub
  • the key has been generated with ssh-keygen -t rsa
  • the key's password is correct

Am I doing something wrong there?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.