git - 致命 : . git/info/refs 无效 : is this a git repository?

标签 git github

我有一个托管在 Assembla 上的 Git 存储库,我正在尝试为其执行:

git push -u origin master

我一遍又一遍地收到以下错误:

fatal: https://[url]/[repo-name].git/info/refs not valid: is this a git repository?

我已经尝试过这里的答案但没有成功:Git .git/info/refs not valid: is this a git repository?

当我使用时:

git status

我得到:

On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean

最佳答案

git remote show origin

显示我尝试推送到的远程存储库不正确。

修复后:

git remote set-url origin [REPO-URL]

问题解决了。

关于git - 致命 : . git/info/refs 无效 : is this a git repository?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43049278/

相关文章:

git - sh.exe 已停止在 Windows 8 上运行

git - 致命的 : NullReferenceException encountered when interacting with remote

git - 应用管理

Git diff 给了我一个致命的 : bad revision 'HEAD~1'

git - 两个github帐户在同一台​​计算机上发生冲突

git - 如何在不要求每个子存储库的密码的情况下使用子模块克隆 git 存储库

github - github上fork和branch的区别

github - 当授权用户对 github pull request 发表评论时如何触发 jenkins 管道阶段?

git - 如何修复 Windows Git 存储库中的区分大小写

git 相当于 `svn export` 或 github 解决方法