无法在github中推送编辑的文件 [英] Not able to push the edited file in github
问题描述
我克隆了一个由我的朋友创建的回购库,我可以修改回购库中的文件并提交。
但推送时出现错误:
错误:请求的网址返回错误:
403访问http://github.com/*****/Hello.git/info/ refs
fatal:HTTP请求失败
我用于推送的命令是:
git push -u origin master
我的朋友(创建了repo)能够使用此命令推送修改过的文件。
请注意,对于您声明为合作者的回购站,您需要使用读取+写入权限网址:
https://UserName@github.com/Name/repoName
换句话说,不是一个http地址,但一个https。
不要忘记设置你的 GitHub crendentials ,你的代理(如果有的话),以及你的 .netrc (或 _netrc
)。 p>
I cloned a repo which was created by my friend and I am able modify the files inside the repo and commit.
But while pushing I am getting error:
error: The requested URL returned error:
403 while accessing http://github.com/*****/Hello.git/info/refs
fatal: HTTP request failed"
The command I used for pushing is:
git push -u origin master
My friend ( who created the repo ) able to push the modified files with this command.
Note that for a repo where you are declared as collaborator, you need to use a "Read+Write access" url:
https://UserName@github.com/Name/repoName
In other words, not an http address, but an https one.
Don't forget to set your GitHub crendentials, your proxy (if you have one), and your .netrc
(or _netrc
on Windows).
这篇关于无法在github中推送编辑的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!