远程:找不到存储库

时间:2018-08-10 03:17:50

标签: git github

我是github的新手,当我尝试将代码推送到github时,它说找不到远程存储库。 第一次尝试时,我可以推送代码,但这次却不能。这可能是权限问题吗? 这是我的git的样子:

Me@ MINGW64 ~/JJJgin git@github.com:Alchemist21/MyWeb.git
fatal: remote origin already exists.

Me@ MINGW64 ~/Desktop/xxx2.0 (master)
$ git remote -v
origin  https://github.com/xxx/MyWebsite.git (fetch)
origin  https://github.com/xxx/MyWebsite.git (push)

Me@ MINGW64 ~/Desktop/xxx2.0 (master)
$ git commit "Add files"
error: pathspec 'Add files' did not match any file(s) known to git.

Me@ MINGW64 ~/Desktop/xxx2.0 (master)
$ git commit -m "Add files"
On branch master
nothing to commit, working tree clean

Me@ MINGW64 ~/Desktop/xxx2.0 (master)
$ git push origin master
remote: Repository not found.
fatal: repository 'https://github.com/xxx/xxx.git/' not found

1 个答案:

答案 0 :(得分:2)

您的存储库名称为Alchemist21/MyWeb,因此请确保您的URL是正确的(区分大小写)

cd xxxx2.0
git set-url origin https://github.com/Alchemist21/MyWeb.git

然后修改文件,确保已设置config user.name和git config user.email。

git add .
git commit -m "new files"
git push -u origin master
相关问题