这是第n次,我正在尝试连接到我的github帐户,并且在我未能做到这一点时变得越来越令人沮丧.
我在Windows上逐步遵循本教程Github设置,但我在第5步失败了,即测试一切.
ssh git@github.com
Run Code Online (Sandbox Code Playgroud)
给了我这个
ssh: github.com: no address associated with name
Run Code Online (Sandbox Code Playgroud)
有什么想法有什么不对?任何帮助将不胜感激.
我正在使用Windows XP上的railsinstaller附带的默认git安装(在代理后面)
Von*_*onC 19
您至少需要设置一个HTTP_PROXY可变环境.
set HTTPS_PROXY=http://<login_internet>:<password_internet>@aproxy:aport
set HTTP_PROXY=http://<login_internet>:<password_internet>@aproxy:aport
Run Code Online (Sandbox Code Playgroud)
或者,对于bash会话:
export http_proxy=http://<login_internet>:<password_internet>@aproxy:aport
export https_proxy=http://<login_internet>:<password_internet>@aproxy:aport
Run Code Online (Sandbox Code Playgroud)
确保%HOME%(或$ HOME)设置为存储.ssh配置的目录
然后,对于git命令:
git config --system http.sslcainfo \\bin\\curl-ca-bundle.crt
git config --global http.proxy http://<login_internet>:<password_internet>@aproxy:aport
git config --global user.name <short_username>
git config --global user.email <email>
git config --global github.user <github_username>
git config --global github.token <github_token>
Run Code Online (Sandbox Code Playgroud)
注意:对于bash会话:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
Run Code Online (Sandbox Code Playgroud)
要避免GitHub询问您的密码,请_netrc在您的HOME(或.netrcbash会话中)创建一个文件
machine github.com
login <login_github>
password <password_github>
Run Code Online (Sandbox Code Playgroud)
2012年更新
需要注意的是,因为git1.7.10(2012),可以使用凭证缓存机制,以避免以纯文本格式来存储您的登录/密码(一个%HOME%/_netrc文件).
| 归档时间: |
|
| 查看次数: |
40059 次 |
| 最近记录: |