我有本地工作副本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
我不确定会有什么问题。
当前回答
在我的情况下,我需要在Linux上使用Ctrl + H打开目录来查看隐藏的文档,所以我进入Git配置并在URL中取出。Git。
其他回答
执行git远程更新对我来说很有效。
我遇到了同样的问题,但是当我发现我已经从另一个帐户创建了存储库,并试图从另一个帐户推送代码时。这就是现在我只需要给访问另一个帐户和问题解决。你会发现从
设置>贡献者>添加人员
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.
在Visual Studio中从Github克隆时,点击Github链接上的“浏览存储库”选项,它将要求登录。
因为您可能没有首先将远程git存储库标识到您的终端。
git remote set-url origin https://github.com/MyRepo/project.git
然后,
git add .
git commit -m "initial commit"
git push origin master