Git push返回错误,未提示输入密码

Git push返回错误,未提示输入密码,git,github,Git,Github,在github中创建存储库后,我遵循了最初的步骤,但当我开始时: git push-u原始主机失败,出现以下错误: user$ git push -u origin master error: The requested URL returned error: 403 Forbidden while accessing https://github.com/thestranger/cfinder.git/info/refs fatal: HTTP request failed 我已经远程添加

在github中创建存储库后,我遵循了最初的步骤,但当我开始时:
git push-u原始主机
失败,出现以下错误:

user$ git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/thestranger/cfinder.git/info/refs

fatal: HTTP request failed
我已经远程添加了正确的源url,我有git 1.7.10。奇怪的是,它根本没有提示我输入用户名或密码,所以我不知道它试图使用什么来访问github上的存储库。有人知道为什么它不会提示我输入密码吗

为了澄清,我遵循的步骤是github在立即创建存储库后向我展示的步骤:

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/thestranger/cfinder.git
git push -u origin master

您可以尝试将URL更改为使用SSH而不是HTTPS。在回购协议的根目录中:

git remote set-url origin git@github.com:thestranger/cfinder.git

这将要求您在GitHub帐户上注册公钥。

应该支持https,但您需要git 1.7.10+

git 1.7.1
中,可以更改远程:

https://github.com/username/project.git


这样,它肯定会提示输入密码。

哪个操作系统?你安装了SSH代理吗?Mac OS X,我也这么认为。我在Mac OS XThanks上也遇到了同样的问题,但我仍然想知道问题出在哪里。我也不确定。我一直使用HTTPS进行只读访问,使用SSH进行读写。
https://username@github.com/username/project.git