Thanks to visit codestin.com
Credit goes to github.com

Skip to content

failed to start SSH session: unable to exchange encryption keys #1809

Open
@abdeldjalil-fellah

Description

@abdeldjalil-fellah
        var r = new Repository(working);
        r.Network.Remotes.Add("remote", @"[email protected]:user1234/test.git");

        r.Network.Push(r.Network.Remotes["remote"], @"refs/heads/master", new PushOptions
        {
            CredentialsProvider =
            //(url, user, credentials) => new UsernamePasswordCredentials
            //{
            //    Username = "user1234",
            //    Password = "********"
            //}
            (url, user, credentials) => new SshUserKeyCredentials
            {
                Username = "git",
                Passphrase = string.Empty,
                PublicKey = @"C:\Users\me\.ssh\gitlab.pub",
                PrivateKey = @"C:\Users\me\.ssh\gitlab"
            }
        });

both UsernamePasswordCredentials and SshUserKeyCredentials (openssh keys already added to gitlab) give:

failed to start SSH session: unable to exchange encryption keys

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