Git的HTTP - 记安全证书 [英] Git http - securely remember credentials

查看:157
本文介绍了Git的HTTP - 记安全证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法能够安全地让混帐记住我的凭据连接到远程仓库通过HTTP(S)是什么时候?

Is there a way to securely let git remember my credentials when connecting to remote repositories over HTTP(S)?

我试过在 <详细介绍了 core.askpass 办法code>混帐配置 让外部脚本提供我的凭据。虽然它的伟大工程的用户名和密码仍存储在小的shell脚本纯文本。

I've tried the core.askpass approach detailed in git-config to let an external script supply my credentials. Although it works great the username and password is still stored in plain text in the small shell script.

推荐答案

混帐通过HTTP运行时调用卷曲。您可以通过设置在用户的主目录的.netrc 文件,并使其私人用户(0600 Linux环境)存储安全凭据。

git invokes cURL when running over HTTP. You can store secure credentials by setting up a .netrc file in your user's home directory, and making it private to the user (0600 in Linux).

该文件的内容提供每个远程域的用户名和密码。

The contents of the file provide the username and password per remote domain.

machine myRemoteServer
login myUserName
password s3cret

请参阅http://stackoverflow.com/questions/3947530/git-push-fatal-failed/7177690#7177690全服务器端的配置,它可以很容易地包括LDAP服务器的呼叫。

See http://stackoverflow.com/questions/3947530/git-push-fatal-failed/7177690#7177690 for full server side configuration, which can easily include calls to your ldap server.

这篇关于Git的HTTP - 记安全证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆