我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。
我打开终端使git按-f
remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found
我不确定会有什么问题。
我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。
我打开终端使git按-f
remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found
我不确定会有什么问题。
当前回答
确保您拥有正确的访问权限,当分支受到保护时可能会发生这种情况。
我刚刚浪费了四个小时在这上面。
其他回答
这可能是一个重叠的问题,你在同一时间配置不同的帐户。
试着检查:
git config user.name git config user.email
检查是否与远程回购相同。
查看repo git remote -v
I was trying to clone a repo and was facing this issue, I tried removing all git related credentials from windows credentials manager after that while trying to clone git was asking me for my credentials and failing with error invalid username or password. This was happening because the repo I was trying to clone was under an organization on github and that organization had two factor auth enabled and git bash probably do not know how to handle 2fa. So I generated a token from https://github.com/settings/tokens and used the github token instead of password while trying to clone the repo and that worked.
我通过删除.git文件(隐藏文件夹),然后再次上传解决了这个问题。
请在下面找到Windows的工作解决方案:
从“开始”菜单打开“控制面板”。 选择用户帐户。 选择“凭据管理器”。 点击“管理Windows凭证”。 删除所有与Git或GitHub相关的凭证。 一旦你删除了所有,然后尝试再次克隆。
确保您拥有正确的访问权限,当分支受到保护时可能会发生这种情况。
我刚刚浪费了四个小时在这上面。