按照github的如下命令提示创建本地项目结果提示错误:
echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:oneweekonething/test.git
git push -u origin master
错误信息:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方法:
第一步:在github上创建一个和本地一样的项目名字,记得不要添加REAME.MD文件。
第二步:设置远程仓库url git remote set-url origin git@github.com:oneweekonething/test.git
然后就可以了。