我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。

我打开终端使git按-f

remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found

我不确定会有什么问题。


当前回答

这里的问题是windows凭据管理器,请去控制面板,搜索凭据管理器,并删除它关于github的所有内容

其他回答

在Visual Studio中从Github克隆时,点击Github链接上的“浏览存储库”选项,它将要求登录。

如果你没有写权限,只有读权限,就会发生这种情况。 如果它是一个私有存储库,您应该被添加为合作者。 检查你的证件是否正确。

Git实际上不会说这些事情,它只会说,你的凭证没有发现回购。

祝你好运。

从系统中删除所有github.com凭据详细信息。

对于mac

从Keychain Access中删除github.com密码。

对于windows

从凭证管理器中删除凭证。

在Windows上:

进入。git文件夹 使用记事本或任何其他编辑器打开“配置”文件 将您的URL从https://github.com/username/repo_name.git更改 https://username: password@github.com/username/repo_name.git

保存并推送代码,它将工作。

试试这个,对我很管用。

git remote rm origin
git remote add origin https://github.com/your-username/{{project-name}}.git