我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。

我打开终端使git按-f

remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found

我不确定会有什么问题。


当前回答

如果你在windows上得到控制面板-> windows凭据,然后从通用凭据选项删除github凭据。然后尝试克隆

其他回答

我也面临着同样的问题,正在解决

git add .

git commit -m "message"

git remote set-url origin https://YOUR_GITHUB_USER@github.com/aceofwings/RotairERP.git

then

git pull

您可能正在尝试推送到私有存储库。在这种情况下,您必须请求管理员验证Collaborator访问。

这可能是身份验证的问题。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/)。

我也有这个问题。 为了解决这个问题,I: 1. 移动我的本地。dotfiles到_.dotfiles_bak 2. 克隆我的远程git存储库 3.从_.dotfiles_bak拷贝了我所有的文件 到。dotfiles -除了。git文件夹 3.然后我又可以在当地工作了: 编辑,承诺和推动

因为您可能没有首先将远程git存储库标识到您的终端。

git remote set-url origin https://github.com/MyRepo/project.git

然后,

git add .
git commit -m "initial commit"
git push origin master