与github同步 [英] Syncing with github
问题描述
这是我试图连接到我的github帐户的第n次,并且由于我没有这样做而变得越来越沮丧。
我按照这个教程一步一步 Github在Windows上设置,但我在第5步失败,即测试一切。
ssh git @ github .com
给我这个
ssh:github.com:没有地址与名称关联
任何想法哪里不对?任何帮助将不胜感激。
我使用Windows XP中的railsinstaller附带的默认git安装(代理服务器后面)
您至少需要设置< b $ b
set HTTPS_PROXY = http://< login_internet>:< password_internet> @aproxy:aport
set HTTP_PROXY = http://< login_internet> :< password_internet> @aproxy:aport
或者,对于bash会话:
export http_proxy = http://< login_internet>:< password_internet> @aproxy:aport
export https_proxy = http://< ; login_internet>:< password_internet> @aproxy:aport
确保% HOME%
(或$ HOME)设置为您存储 .ssh
config
$ b的目录$ b
然后,对于git命令:
git config --system http.sslcai nfo \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 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>
注意:对于bash会话:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
为了避免GitHub询问你的密码,在你的 HOME
(或者a)中创建一个 _netrc
$ b $ $ $ $ $ $ $ $ $ b登入< login_github>
密码< password_github>
更新2012
请注意,自自git1.7.10 (2012)以来,您可以使用自动缓存机制,以避免以纯文本形式存储您的登录名/密码(在%HOME%/ _ netrc
文件)。
This is for the nth time that I'm trying to connect to my github account and its becoming increasingly frustrating at my failure to do this.
I followed this tutorial step by step Github setup on windows but I failed at step 5, i.e. Test everything out.
ssh git@github.com
gives me this
ssh: github.com: no address associated with name
Any ideas what is wrong? Any help would be greatly appreciated.
I'm using the default git installation which comes with railsinstaller on Windows XP (behind a proxy)
You need to at least set an HTTP_PROXY
variable environment.
set HTTPS_PROXY=http://<login_internet>:<password_internet>@aproxy:aport
set HTTP_PROXY=http://<login_internet>:<password_internet>@aproxy:aport
Or, for bash session:
export http_proxy=http://<login_internet>:<password_internet>@aproxy:aport
export https_proxy=http://<login_internet>:<password_internet>@aproxy:aport
Make sure %HOME%
(or $HOME) is set to a directory where you did store your .ssh
config
Then, for git commands:
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>
Note: for bash session:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
To avoid GitHub asking for your password, create a _netrc
file in your HOME
(or a .netrc
for bash session)
machine github.com
login <login_github>
password <password_github>
Update 2012
Note that since git1.7.10 (2012), you can use a credential caching mechanism in order to avoid having to store in plain text your login/password (in a %HOME%/_netrc
file).
这篇关于与github同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!