我有一个非常奇怪的问题与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
什么好主意吗?
当前回答
检查是否具有读写权限。
Git错误消息具有误导性。我也遇到过类似的问题。我被添加到一个现有的项目中。我克隆了它并提交了一个本地更改。我去推,得到了ERROR: Repository not found。错误消息。
将我添加到项目的人给了我对存储库的只读访问权。他们做出了改变,我得以推动。
其他回答
这也可能发生,因为GitHub本身宕机了。一定要检查stat.github.com,看看问题是否在他们那边。
2018年10月22日,你有好几个小时都无法推送到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上的仓库->设置->合作者和团队->添加 成员/维护你的用户->现在他们获得了提交的权限 ,推动
我也遇到了同样的问题,尝试了很多方法,但最后,我知道我没有足够的权限来推或拉这个回购,还有一种方法来检查你是否有权限,你无法看到该回购中的设置选项,如果你有权限,那么你将能够看到设置选项
谢谢!这是我观察到的
如果使用私有存储库检查连接用户,则该用户必须具有使用存储库的权限。
Github于2021年8月13日删除了用户名和密码的使用。现在改用个人代币
要克服这一点,请使用create personal token生成个人令牌。并使用下面的代码片段来实现推送和克隆功能。
推动
git remote remove origin
git remote add origin https://[USER]:[TOKEN]@github.com/[USER]/[REPO]
git push
克隆
git clone https://[USER]:[TOKEN]@github.com/[USER]/[REPO]