我在git
和github
方面遇到了一个非常奇怪的问题。当我尝试推送时,我得到的结果是。
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
我添加了远程。
git remote add origin [email protected]:account-name/repo-name.git
有什么想法吗?
我得到了同样的错误
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
而我在Github上创建了仓库,并在本地克隆了它。
我通过打开.git/config并删除[remote "origin"]
部分来解决。
[remote "origin"]
url = [email protected]:alexagui/my_project.git
fetch = +refs/heads/*:refs/remotes/origin/*
然后我运行了以下程序(再次)
git remote add origin [email protected]:alexagui/my_project.git
git push -u origin master
这次我能够推送到版本库了。