我有本地工作副本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
它的工作原理……
其他回答
在Windows上:
进入。git文件夹 使用记事本或任何其他编辑器打开“配置”文件 将您的URL从https://github.com/username/repo_name.git更改 https://username: password@github.com/username/repo_name.git
保存并推送代码,它将工作。
这可能是身份验证的问题。SourceTree缓存你的github凭据(用于通过https访问存储库),但从终端你必须使用凭据配置git (https://help.github.com/articles/creating-an-access-token-for-command-line-use/)或使用git+ssh和ssh密钥对(https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)。
我在VS code中遇到这个错误,因为我正在使用VS code git扩展。它将我的git凭证保存在Linux key-ring上。而我想从另一个帐户的git拉到储存库。 最简单的解决方案是打开Linux shell(不是在VS code中集成的那个),然后运行:
git pull origin master
这一次,它会问你Github的用户名和密码。
执行git远程更新对我来说很有效。
检查url s.source是否正确。
为我树立榜样
// fail Project>>t<<est
s.source = { :git => '.../Projecttest-iOS', :tag => s.version.to_s }
// success Project>>T<<est
s.source = { :git => '.../ProjectTest-iOS', :tag => s.version.to_s }