Skip to content

Failed to authenticate SSH session: Waiting for USERAUTH response #720

@white-gecko

Description

@white-gecko

I get the message _pygit2.GitError: Failed to authenticate SSH session: Waiting for USERAUTH response with the following script:

import os
import pygit2

url = "ifigit@git.informatik.uni-leipzig.de:hardwarepraktikum/hwpb.git"        # ssh public

class MyRemoteCallback (pygit2.RemoteCallbacks):
    def credentials(self, url, username_from_url, allowed_types):
        ssh = os.path.join(os.path.expanduser('~'), '.ssh')
        print(ssh)
        pubkey = os.path.join(ssh, 'id_rsa.pub')
        privkey = os.path.join(ssh, 'id_rsa')
        return pygit2.Keypair(username_from_url, pubkey, privkey, "")

repo = pygit2.clone_repository(url, "repo", callbacks=MyRemoteCallback())

id_rsa and id_rsa.pub are just created with ssh-keygen and has no password.

Does the SSH connection also ask for the known hosts?

Maybe the objective-git issue is related: libgit2/objective-git#511

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