-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] salt-master unable to connect gitfs of ext_pillar #57121
Comments
Looks like that error is from here: https://github.com/libgit2/libgit2/blob/master/src/transports/ssh.c#L806 Are you sure that the ssh keys are really the ones being used? Use these instructions on StackOverflow to double check. |
Yes i found the reference to the libgit2 error also, witch pointed to key problems, or possibly a unexpected authentication method line. I have teste with the keys in the location above, but also with the keys in de /root/.ssh/ location none of this helps. The SSH Server response with below when salt of pygit2 tries to connect. (IP replaced)
I check the python scripts with truss and that shows the key files being opend.
Permissions /root/.ssh/
Permissions /usr/local/etc/salt/ssh_keys/
As said, using a git clone as root is using the key and clones without problems. |
After another 2 days of trying i decided to switch to https:// for gitfs and ext_pillar, so far this works. I still do not know if this is a configuration error or salt/gitfs2/libssh2 error. Thanks for the support. |
@rvvliet I basically have the same issue (but trying to fetch), using pygit2, I found this issue googling for the error message. I managed to use the From your example, the relevant part would look like: class MyRemoteCallbacks(pygit2.RemoteCallbacks):
def credentials(self, url, username_from_url, allowed_types):
if allowed_types & pygit2.credentials.GIT_CREDTYPE_USERNAME:
return pygit2.Username("git")
elif allowed_types & pygit2.credentials.GIT_CREDTYPE_SSH_KEY:
return pygit2.KeypairFromAgent("git")
else:
return None I'd be interested to hear feedback about this from you. It was a great waste of time for me so far so I'd like to see progress on the matter (and spread some hints in the web for those who follow). Using any Keypair from disk should work. |
FWIW, I just faced the same issue, and after fighting some with it, it went away when I switched from RSA to ED25519 key (in new format, header
|
HI there, I had the same issue using gitfs as fileserver backend and github repos.
An ECDSA key was succesfully used, Ed25519 seems broken |
Can confirm that works with ECDSA but not ed25519. I was bitten by this bug this week. Currently running on Debian 11 (Bullseye) with libssh2-1.9.0, seems to be an upstream issue related to libssh2 and ed25519 keys. Prior to changing keys to ECDSA i was unable to use gitfs or ext_pillar keyed authentication. Salt: 3004.1
Dependency Versions:
cffi: 1.15.0
cherrypy: Not Installed
dateutil: 2.8.1
docker-py: Not Installed
gitdb: 4.0.5
gitpython: 3.1.14
Jinja2: 2.11.3
libgit2: 1.4.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.0
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.7
pygit2: 1.9.1
Python: 3.9.2 (default, Feb 28 2021, 17:03:44)
python-gnupg: 0.4.6
PyYAML: 5.3.1
PyZMQ: 20.0.0
smmap: 4.0.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: debian 11 bullseye
locale: utf-8
machine: x86_64
release: 5.10.0-14-amd64
system: Linux
version: Debian GNU/Linux 11 bullseye |
Just a little update:
|
Using the following versions still generates the same error for me which is blocking as Github now kinda requires ed25519 deploy keys: Salt Version:
Salt: 3006.0
Python Version:
Python: 3.10.11 (main, Apr 14 2023, 05:57:16) [GCC 11.2.0]
Dependency Versions:
cffi: 1.15.1
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: 1.6.3
looseversion: 1.0.2
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 22.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: 1.12.0
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 23.2.0
relenv: 0.11.2
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: amzn 2
locale: utf-8
machine: x86_64
release: 5.15.49-linuxkit
system: Linux
version: Amazon Linux 2 |
Description
I'am rebuilding my salt-master and configuring gitfs and ext_pillar git but gitfs is unable to connect to the git repo.
The ssh keys are working and have been tested using ssh client as does a git clone on the server with these keys.
The salt master config has been used on the original server without problems, only the keys are renewed, i have tested ED25519 and RSA type keys.
Setup
Steps to Reproduce the behavior
Start the salt-master , maybe in debug mode and check log of output.
Expected behavior
Connection to Git
Screenshots
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
The text was updated successfully, but these errors were encountered: