找不到 git fatal error refs

标签 git fatal-error git-bash gitstack

尝试推送到我设置的运行 GitStack 的 Windows 服务器时出现此错误。

致命:未找到 http://xx.xx.x.xxx/mjtest.git/info/refs:您是否在服务器上运行了 git update-server-info?

这个错误在 Git、GitBash 和 GitStack 的新手中似乎很常见,所以我找到了一些可能的解决方案,但似乎没有一个对我有用。

这就是导致错误的原因,首先我在 GitStack 中创建了一个名为 mjtest 的空存储库,然后我创建了一个用户并将其添加到存储库并授予他们读写权限,然后我使用 GitBash 创建本地存储库并尝试推送它。

git config --global user.name "XXXXXXX"
git config --global user.email XXXXXXX
mkdir ~/mjtest
cd ~/mjtest
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin http://XX.XX.X.XXX/mjtest.git
git push origin master

然后这会要求我输入用户名,然后输入正确的密码。输入后,它会返回 fatal error 消息。

如有任何帮助,我们将不胜感激。

最佳答案

它可能与 control access issue 有关.
这通常发生在 repo 尚未设置为导出时(通过 git-daemongitweb):GitStack 可以依赖类似的机制。
参见 this thread例如/

I created an 'empty' file with the name "git-daemon-export-ok' inside one of my repositories.
I can now clone / push / pull to this repository without issues.

该文件应该直接在服务器上裸仓库的 xxx.git 根目录下创建。

关于找不到 git fatal error refs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12953500/

相关文章:

performance - 移动应用程序的精益 Node.js + Nginx 服务器基础设施?

php - Laravel 调用未定义的方法 Config::get()

python - 路径 "."和 "./"以及 "./."之间的差异

c++ - 加载共享库时出错 : jvm. dll

windows-8 - Git Bash 从哪里获得所有主机映射?

git - 如何设置 Yocto 配方以从本地 git 源构建?

git clone - 如何抑制 "You appear to have cloned an empty repository"警告?

php - Magento 1.9 fatal error Mage_Configurableswatches_Helper_Productimg' 找不到

git - 如何使用 git-p4 取消搁置更改

ios - Mapview - 防止发现坐标为零