当前位置: 首页 > 面试题库 >

在将gnome-keyring用作Sudo时使用Git凭证帮助器时出错

锺离飞鸣
2023-03-14
问题内容

我一直在寻找一种方法,以在连接到使用SSL的Git服务器时安全地存储凭据。我遇到了@james-ward的建议我所做的只是我更新了Git的“系统”配置而不是“全局”配置

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

先感谢您!-理查德·O。


问题答案:

有时我需要运行sudo git clone,因为有时我需要进行克隆的目录需要它。任何帮助,将不胜感激

您尝试将存储库克隆到的文件夹是由root创建的,因此除非您是root(sudo),设置权限(chmodchown),否则您没有写权限或在其下创建文件夹的权限,并且可以克隆到夹。

chmod 755 /path


 类似资料:
  • 我正在寻找一种方法,在连接到使用SSL的Git服务器时安全地存储凭据。我通过@james-ward提出了这个建议(我所做的唯一编辑是我更新了我们的“系统”配置,而不是Git的“全局”配置(https://stackoverflow.com/a/14528360/6195194)) 然后我就可以跑了 凭据助手将存储我的凭据,但是当我运行以下操作时: 它给我以下错误 有时我需要运行sudo-git克隆

  • Git 1.8.0支持与gnome-keyring的集成。 在阅读了关于git凭据帮助程序的文档之后:http://git-scm.com/docs/gitcredentials.html 我无法找到使用这个新功能的方法。我如何整合它?我使用的是Archlinux和从Archlinux的存储库安装的git。(git 1.8.0)

  • Repo is a tool that we built on top of Git. Repo helps us manage the many Git repositories, does the uploads to our revision control system, and automates parts of the Android development workflow. Re

  • 如需克隆 QEMU 代码,使用 git clone https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/qemu.git 或运行 git remote set

  • Repo is a tool that we built on top of Git. Repo helps us manage the many Git repositories, does the uploads to our revision control system, and automates parts of the Android development workflow. Re

  • 如需克隆 GCC 代码,使用 git clone https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git 若要将 tuna mirror 加入已有代码库,可在已有仓库中运行 git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git 或运行 git remote set-ur