我正在寻找一种方法来安全地存储凭证,同时连接到使用SSL的Git服务器.我在@james-ward中遇到了这个建议(我编辑的只是我更新了我们的"系统"配置,而不是Git的"全局"配置(/sf/answers/1016985231/)
sudo apt-get install libgnome-keyring-dev
cd /usr/share/doc/git/contrib/credential/gnome-keyring
sudo make
git config --system credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
然后我就可以跑了
git clone https://ipaddress/git/repo.git
并且凭证助手将存储我的凭据,但是当我运行以下内容时:
sudo git clone https://ipaddress/git/repo.git testfolder
它给我以下错误
** (process:3713): CRITICAL **: Error communicating with gnome-keyring-daemon
我有时需要运行sudo git clone,因为有时我需要创建克隆的目录需要它.任何帮助,将不胜感激.
我正在使用的版本: - git版本1.9.1 - Ubuntu Server 14.0.4
先感谢您!-Richard O.
我刚刚在bitbucket上创建了git repo.然后我按照以下方式创建ssh密钥:
   1. ssh-keygen -t rsa -C 'dien.vo@asnet.com.vn'
   2. ssh-keygen (press enter more)
   3. cat ~/.ssh/id_rsa.pub --> it return for me a SSH key
   4. Coppy that and added on bitbucket, then I save the new SSH key
之后我选择了SSH链接git git@bitbucket.org:DienVo/abc.git,但是在终端中显示了这一点
sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我不知道我错在哪里,请帮我解决.
git repo 没有启用 LFS,但我准备在另一个克隆中使用 git,因此使用git config --global credential.helper似乎是问题的原因。
这里似乎有同样的问题,但我使用的是更新版git(v2.17.0),所以这不是版本问题。
示例:简单之后的git pull消息是
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 1: 
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 
 /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret: 
 not found
笔记
没有git-credential-libsecret文件,
sudo ls /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
ls: cannot access '/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret': No such file or directory