我刚刚克隆了一个仓库,然后做了一次提交并尝试推送它,但出现了这个错误:
有什么想法可以解决这个问题吗?
我刚刚在我的第一个GitHub存储库中遇到了同样的问题。在我的情况下,问题与启用双因素身份验证有关。由于命令行工具不知道双因素身份验证,所以我让GitHub生成一个身份验证令牌。
问题在于双击标记选择时,会一并选择其左侧的空格,导致我复制了无效代码。从标记一端到另一端小心地点击并拖动是可行的。
git remote show origin
fresa
已经被声明为AntonDerenivsky/lado
仓库的协作者时,使用'fresa'才能起作用。或者您需要fork该仓库,并使用以下内容:git remote rename origin upstream
git remote add origin https://fresa@github.com/fresa/lado
git push -u origin master
git remote add
,而不是 set-url
。这假设你已经在 GitHub 上先 fork 了该仓库(https://help.github.com/articles/fork-a-repo)。 - VonC# ERROR: Repository not found.
# fatal: Could not read from remote repository.
# copy and paste ssh destination git@github.com:user/repo.git
git remote -v
git remote remove origin
git remote add origin git@github.com:user/repo.git
也许你需要更改密码。
我曾经遇到过同样的问题,然后使用楼上的方法解决了。
记得将url git@github.com:user/repo.git
替换为你自己的。
git remote -v
git remote remove origin
git remote add origin git@github.com:user/repo.git