简体   繁体   English

Salt Master无法连接到gitfs远程

[英]Salt master not able to connect to gitfs remote

I am trying to configure remote github repo as the salt server root but it can't make the authentication successful with the pub/priv keypair. 我正在尝试将远程github存储库配置为盐服务器根目录,但它无法使发布/私有密钥对的身份验证成功。 I have given the location of the keys in the /etc/salt/master file as well. 我也给出了/ etc / salt / master文件中键的位置。

Below are the logs I am getting: 以下是我得到的日志:

2018-11-05 01:48:32,197 [salt.utils.gitfs :1574][ERROR   ][21391] Error occurred fetching gitfs remote 'git@[github-endpoint].git': failed to start SSH session: Unable to exchange encryption keys
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/utils/gitfs.py", line 1552, in _fetch
    fetch_results = origin.fetch(**fetch_kwargs)
  File "/usr/lib64/python2.7/site-packages/pygit2/remote.py", line 405, in fetch
  File "/usr/lib64/python2.7/site-packages/pygit2/errors.py", line 64, in check_error
GitError: failed to start SSH session: Unable to exchange encryption keys

I have checked the keypair and connection to the github endpoint. 我已经检查了密钥对和到github端点的连接。 I am able to sync the repo manually in the server. 我能够在服务器中手动同步仓库。

I found with the same issue and I finally solved with the following steps: 我发现了同样的问题,最后通过以下步骤解决了问题:

  1. I create a new ssh key: ssh-keygen -f gitfs_ssh -C 'test@example.com' 我创建一个新的ssh密钥: ssh-keygen -f gitfs_ssh -C 'test@example.com'
  2. Then, I read that an empty line at the end of the private key could be fatal for libssh2, so I removed the empty lines at the bottom of the file (added by ssh-keygen at creation time) and then the new key began to work. 然后,我读到私钥末尾的空行对于libssh2可能是致命的,因此我删除了文件底部的空行(在创建时由ssh-keygen添加),然后新密钥开始工作。

More info in this link 此链接中的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM