我有本地工作副本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 clone https://github.com/abc/def.git
Cloning into 'def'...
remote: Repository not found.
fatal: repository 'https://github.com/abc/def.git/' not found
解决方案- 卸载凭据管理器-
abc@DESKTOP-4B77L5B MINGW64 /c/xampp/htdocs
$ git credential-manager uninstall
abc@DESKTOP-4B77L5B MINGW64 /c/xampp/htdocs
$ git credential-manager install
它的工作原理……
其他回答
在ubuntu上,我遇到了这个问题。我通过运行下面的命令重置凭据帮助器来解决这个问题。
git config credential.helper ""
运行此命令后,当您拉或推时,将要求您再次输入凭据。
在我的情况下,上述解决方案都不起作用。
我通过将remote.origin.url从https切换到ssh来解决这个问题:
验证git配置:
git config --list
应该是这样:
...
remote.origin.url=https://github.com/ORG/repo-name.git
...
使用SSH更新remote.origin.url:
git remote set-url origin git@github.com:ORG/repo-name.git
操作系统
使用VS Code和一个没有密码的密钥:
removed eval "$(ssh-agent -s)" line from my ~/.zshrc file to stop running it in the background (first step on Github's Generating a new SSH key article) verified my .ssh/config entry for *.github.com did not have a UseKeychain line used simply ssh-add ~/.ssh/id_ed25519 with NO --apple-use-keychain on VS Code "Git: Add remote..." allowed/authorized my Github account connection (you don't really need to add a remote) applies a new "vscodevscode.github-authentication" entry in Mac's Keychain Access app closed all shells and VS Code, restarted and the repo is now always found
对于Mac
打开KeyChain访问,并在密码类别上找到您的密码帐户(您可以在右上角KeyChain访问页面上搜索它)
当你找到它时,删除所有与git源代码控制相关的键。再试一次
我遇到了同样的问题,但是当我发现我已经从另一个帐户创建了存储库,并试图从另一个帐户推送代码时。这就是现在我只需要给访问另一个帐户和问题解决。你会发现从
设置>贡献者>添加人员