我有本地工作副本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目录中的用户名和令牌。
转到git文件夹,进入。git文件夹,打开“config”文件 使用记事本或任何其他编辑器更改您的URL从 https://github.com/username/repo_name.git https://username:token@github.com/username/repo_name.git 用户名应该没有@域名。 保存并推送代码,它将工作。 在这里,您需要保存密码和 安全威胁。
在Windows上:
进入。git文件夹 使用记事本或任何其他编辑器打开“配置”文件 将您的URL从https://github.com/username/repo_name.git更改 https://username: password@github.com/username/repo_name.git
保存并推送代码,它将工作。
其他答案都不适合我,我可以在浏览器中查看回购,但当试图获取或做一个新的克隆时,得到了Not Found错误。出于某种原因,这解决了问题:
在浏览器中访问Github repo。 点击绿色的“代码”按钮(如下图)。 选择“使用Github桌面打开”。 Github桌面应该打开并成功获取。 你现在可以关闭Github桌面,从控制台或你选择的Git软件中获取或克隆。
我也面临着同样的问题,正在解决
git add .
git commit -m "message"
git remote set-url origin https://YOUR_GITHUB_USER@github.com/aceofwings/RotairERP.git
then
git pull
因为您可能没有首先将远程git存储库标识到您的终端。
git remote set-url origin https://github.com/MyRepo/project.git
然后,
git add .
git commit -m "initial commit"
git push origin master