我有一个非常奇怪的问题与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
什么好主意吗?
当前回答
对我来说,这些回答都没用。 我只是忘记在远程(github.com)上创建回购。所以我在网上创建了我的回购,用同样的名字,然后重新做
所以,这是整个故事:
git init ...
git add ...
git commit ...
git remote add origin git@github.com:<myName>/<myRepo>.git
git push -u origin main
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这里你需要在github.com上添加你的回购,使用相同的“myRepo”名称
git push -u origin main
其他回答
这也可能发生,因为GitHub本身宕机了。一定要检查stat.github.com,看看问题是否在他们那边。
2018年10月22日,你有好几个小时都无法推送到GitHub。
我试了所有的办法,但似乎都不管用。进一步的研究表明:
这里有一个解决问题的综合方法。 当你数到5。修复4,注意VS代码会要求认证。
如果您输入了密码,仍然得到身份验证错误,请执行以下操作。
转到你的GitHub菜单做设置->开发人员设置->个人访问令牌->生成新的令牌。并确保这些框都是按照下图选中的。生成一个访问令牌并将其保存在可访问的地方。 使用生成的令牌而不是密码。 然后继续执行步骤6。修复5
这些步骤可以在事后解决问题。
我也有同样的问题。我的问题是误解,我必须先在github上创建空的回购,然后再推到它。哎!包括这个给那些没意识到的人。
问题:由于某些原因,Github不熟悉你的存储库。
Error:在git cli中提示如下:
remote:未找到存储库。致命:库 “https://github.com/MyOrganization/projectName.git/”未找到
解决方案:2个选项
Github might not familiar with your credentials: - The first Option is to clone the project with the right credentials user:password in case you forgot this Or generate ssh token and adjust this key in your Github. aka git push https://<userName>:<password>@github.com/Company/repositoryName.git Repo Permissions Issue with some users - In my Use case, I solved this issue when I realized I don't have the right collaborator permissions on Github in my private repo. Users could clone the project but not perform any actions on origin. In order to solve this:
去Github上的仓库->设置->合作者和团队->添加 成员/维护你的用户->现在他们获得了提交的权限 ,推动
如果你在vscode之前所有的东西都自动化了,现在它不再工作了,试着在vscode上注销你连接的github帐户,然后再登录到有权访问该存储库的正确的github帐户。
这里是你签出和签回的地方。