我有一个非常奇怪的问题与git和github。当我试着推的时候,我得到:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
我添加了遥控器:
git remote add origin git@github.com:account-name/repo-name.git
什么好主意吗?
我有一个非常奇怪的问题与git和github。当我试着推的时候,我得到:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
我添加了遥控器:
git remote add origin git@github.com:account-name/repo-name.git
什么好主意吗?
当前回答
为了解决这个问题(在Linux上),我只需要运行这个:
git config --global --unset credential.helper
其他回答
git remote rm origin
git remote add origin <remote url>
步骤1:
从HTTPS复制链接
步骤2:
在本地存储库中
git remote rm origin
步骤3:
在复制的url中将github.com替换为username.password@github.com
步骤4:
git remote add origin url
转到你的项目文件夹,然后搜索。git文件夹,然后用记事本打开配置文件,检查是否有你的链接到github回购下:[remote "origin"],如果它是不同的,然后在你的github回购,然后编辑它,或在配置文件中打开一个新的回购名称
我也有同样的问题。我的问题是误解,我必须先在github上创建空的回购,然后再推到它。哎!包括这个给那些没意识到的人。
检查是否具有读写权限。
Git错误消息具有误导性。我也遇到过类似的问题。我被添加到一个现有的项目中。我克隆了它并提交了一个本地更改。我去推,得到了ERROR: Repository not found。错误消息。
将我添加到项目的人给了我对存储库的只读访问权。他们做出了改变,我得以推动。