我有本地工作副本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
我不确定会有什么问题。
当前回答
在ubuntu上,我遇到了这个问题。我通过运行下面的命令重置凭据帮助器来解决这个问题。
git config credential.helper ""
运行此命令后,当您拉或推时,将要求您再次输入凭据。
其他回答
试试这个,对我很管用。
git remote rm origin
git remote add origin https://github.com/your-username/{{project-name}}.git
我也面临着同样的问题
remote: Repository not found
fatal: repository 'https://github.com/MyRepo/project.git/' not found
我卸载了git凭证管理器并重新安装了它,然后我就可以很容易地将它拉到存储库中。下面是命令
$ git credential-manager uninstall
$ git credential-manager install
我在Windows10系统中也遇到过同样的问题。
这里的问题是您在系统中的用户名。您可以使用
git credential-manager uninstall
git credential-manager install
如果它不起作用,那么你必须在你的系统中安装ubuntu,在应用商店中可以买到。
在那个ubuntu终端,我强制推送存储库,它在问我用户名和Passwordstrong文本后工作
在我们的案例中,这只是一个在github中授予写权的案例。最初用户只有读权限,它给出了这个错误。
Linux用户:
Git远程rm来源
git远程添加origin https://GITHUB_USERNAME:PERSONAL_ACCESS_TOKEN@github.com/username/reponame.git
生成新令牌