-
-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to clone using SSH with RSA key pair #836
Comments
Same issue with saltstack and gitfs over pygit2
salt --versions
Salt Version:
Salt: 2018.3.3
Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.11
ioflo: Not Installed
Jinja2: 2.10
libgit2: 0.27.7
libnacl: Not Installed
M2Crypto: 0.30.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.27.2
Python: 3.6.6 (default, Sep 12 2018, 18:26:19)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: Ubuntu 18.04 bionic
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.9.93-linuxkit-aufs
system: Linux
version: Ubuntu 18.04 bionic |
Although I don't really know if it was the fix, the following actions solved my problem:
ssh-keygen -f gitfs_ssh -C '[email protected]'
I hope this information can help you. |
Just an update. On MacOS the default format changed, so you need to pass the |
We're currently getting this same error, just from a slightly different location in the code. Same issue though, we are trying to clone a repo using an RSA key for our salt server. I have reproduced using only pygit2 though, and a major difference may be that we are using gerrit as the git backend. Code import pygit2
keypair = pygit2.Keypair(username="user", pubkey="/path/to/key.pub", privkey="/path/to/key", passphrase="")
callbacks = pygit2.RemoteCallbacks(credentials=keypair)
pygit2.clone_repository("ssh://user@gerrit-server/repo", "pygit2.git", callbacks=callbacks) Traceback
I'm not sure how best to troubleshoot this yet, if you have any tips I would love to hear them. EDIT: Sorry, I forgot to add the versions I'm running. pygit2==0.28.2 I have tested with a few older versions of pygit2 (like 0.26.4) and they have failed as well just with different errors. |
Got hit by this issue today, trying to install a salt server with gitfs remotes on a freshly installed Debian Buster host. Versions:
tried newer versions of all the packages, even older (one up, one down), same error. Finally, comparing with a working salt server, found the only difference: in the working salt server, the ssh RSA key length was 2048 bits, while in the new one the key was 4096 bits. Created a new 2048 bits RSA key, used it and all begun working correctly. Hope this helps. |
These are libssh2 issues, not libgit2/pygit2. My advice is to use the latest version of libssh2: 1.9.0 |
Hello, I was having a problem in the Julia libgit2 wrapper wherein I couldn't clone repos using the SSH protocol with a key pair. So, I installed
pygit2
to see if I'd have the same problem and, lo and behold, it doesn't seem to be working.I'm trying to clone with this script:
(
repo_url
is indeed the SSH link, not sure if it's still called a url).It hangs for a really long time and then returns the following stack trace:
I've tried many different configurations of file permissions on the keys (though most of them not for the Python pull).
The text was updated successfully, but these errors were encountered: