我有本地工作副本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
请在下面找到Windows的工作解决方案:
从“开始”菜单打开“控制面板”。 选择用户帐户。 选择“凭据管理器”。 点击“管理Windows凭证”。 删除所有与Git或GitHub相关的凭证。 一旦你删除了所有,然后尝试再次克隆。
在我的情况下,我需要在Linux上使用Ctrl + H打开目录来查看隐藏的文档,所以我进入Git配置并在URL中取出。Git。
您可以尝试删除目录中的.git文件,并重新执行所有操作将解决您的问题!
您必须生成一个新的令牌:这里的步骤是https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
在本地删除原点的控制
git remote remove origin
再次添加它,但现在使用您生成的令牌
git remote add origin https: // <token> @ <git_url> .git
然后按一下
git pull https://@<git_url>.git
注意:
什么是git_url?是当前项目示例的url: github.com/yourUser/yourProy
并删除<>字符