我正在使用Linux,我按照github教程中的指示创建了密钥,使用github注册了它们,并尝试明确地使用ssh-agent - 但是每当我尝试执行pull或push时,git会继续询问我的密码.
可能是什么原因?
我有一个自动构建服务,可以从git私有存储库下载.问题是,当它试图克隆存储库时,它需要提供密码,因为它不会被记住; 因为没有人工交互,它会永远等待密码.如何从id_rsa.pub强制记住它?
我试过按照这些说明操作:https://stackoverflow.com/a/40312117/21728基本上这样做:
sudo apt-get install libsecret-1-0 libsecret-1-dev
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Run Code Online (Sandbox Code Playgroud)
但是当我进行任何网络操作时,我收到此错误:
** (process:7902): CRITICAL **: could not connect to Secret Service: Cannot autolaunch D-Bus without X11 $DISPLAY
Run Code Online (Sandbox Code Playgroud)
这是合乎逻辑的,因为确实没有X11显示器.
如何在Windows(WSL)上的Ubuntu上使Git凭据缓存工作?
嗨,我有我的ssh配置文件设置来自动将ssh密钥添加到ssh代理。但是,当前它不起作用。它以前在工作。我更新了bitbucket的ssh密钥,它不再起作用。重新启动后,必须使用ssh-add -K选项手动添加ssh密钥。
有人可以帮我弄清楚为什么ssh config无法正常工作吗?假设使用AddKeysToAgent yes选项启用ssh密钥的自动添加。
我正在运行macOS Sierra 10.12.4
这是配置(出于敏感目的,我更改了服务器名称)
GSSAPIAuthentication no
# --- SourceTree Generated ---
Host cik-bitbucket__com
HostName bitbucket.com
User cik
PreferredAuthentications publickey
IdentityFile /Users/cik/.ssh/cik-bitbucket__com
UseKeychain yes
AddKeysToAgent yes
# ----------------------------
Host *
UseKeychain yes
AddKeysToAgent yes
ServerAliveInterval 15
IdentityFile /Users/cik/.ssh/id_rsa
Host jenkins
HostName pasjenkins1.mycompany.com
UseKeychain yes
AddKeysToAgent yes
Host jenkinsqa
HostName pasjenkinsqa.mycompany.com
UseKeychain yes
AddKeysToAgent yes
Host artifactory
HostName prp01
UseKeychain yes
AddKeysToAgent yes
Host bitbucket
HostName bitbucket
UseKeychain yes
AddKeysToAgent yes
Host confluence
HostName confluence01
UseKeychain yes …Run Code Online (Sandbox Code Playgroud)