简体   繁体   English

如何存储Gerrit密码?

[英]How to store Gerrit password?

我想知道如何存储Gerrit密码,因为每次需要与远程存储库进行交互时,它都会询问我的密码。

You need to install/configure some "Credential helper" to avoid inputting your credentials repeatedly. 您需要安装/配置一些“凭据帮助器”,以避免重复输入您的凭据。

To know more details about that execute: 要了解有关该命令的更多详细信息,请执行以下操作:

git help credentials

Following some credential helper options: 以下是一些凭据帮助器选项:

Ubuntu Ubuntu的

A good credential helper for Ubuntu is the git-credential-libsecret. git-credential-libsecret是Ubuntu的一个很好的凭据帮助者。 To install/configure it execute: 要安装/配置它,请执行:

sudo apt-get install libsecret-1-0 libsecret-1-dev
sudo make -C /usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret

Other Unixes 其他Unix

You can use the git-credential-cache . 您可以使用git-credential-cache It doesn't need to be installed because it's in the Git package. 由于它位于Git软件包中,因此无需安装。 To configure it execute: 要配置它,执行:

git config --global credential.helper 'cache --timeout 3600'

Windows 视窗

I think a good option for Windows is the Git Credential Manager for Windows . 我认为Windows的一个不错的选择是Windows的Git Credential Manager

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

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