无法推送到新的 gitlab 安装 [英] Can't push to new gitlab install

查看:17
本文介绍了无法推送到新的 gitlab 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家下午好,

备份了几个旧的 git 存储库,并且正在将它们添加到已知的 gitlab 安装中.安装看起来像这里的指南 https://github.com/gitlabhq/gitlabhq/wiki/VirtualBox-Image

Backed up several old git repos and am in the process of adding them to a knew gitlab install. Install looks like the guide here https://github.com/gitlabhq/gitlabhq/wiki/VirtualBox-Image

当像这样添加一个新的origin remote时;

When adding a new origin remote like this;

git remote add origin git@1.2.3.4:project.git

并尝试推送我得到以下信息

and attempting a push I get the following

fatal: 'project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Gitlab 安装运行正常,可通过 HTTP 和 SSH 从 LAN 访问.

Gitlab install is behaving as expecting and accessible via HTTP and SSH from the LAN.

gitlab status 任务也正常返回

The gitlab status task returns fine too

bundle exec rake gitlab:app:status RAILS_ENV=production

有人知道我现在应该去哪里看吗?被难住了.

Anyone have any idea where I should be looking now? Stumped.

编辑.

SSH 密钥存在

我也尝试使用 ssh://git@example.com/usr/local/project.git 样式添加 git 存储库

I've attempted adding the git repo with the ssh://git@example.com/usr/local/project.git style too

推荐答案

这个问题有点老了,所以我不确定这是否仍然有帮助,但我遇到了同样的问题,终于解决了.

This question a bit old, so I'm not sure if this is still helpful, but I was having the same problem and finally fixed it.

我在 此错误报告.

/etc/nginx/sites-available/gitlab 中有一行,如果您遵循有用的评论,就会有您的 IP.改为收听 *:80 .它应该是这样的:

In /etc/nginx/sites-available/gitlab, there's a line that, if you follow the helpful comments, will have your IP. Change it to listen to *:80 instead. It should look like this:

listen *:80 default_server;         # e.g., listen 192.168.1.1:80;

然后,重启 Gitlab 和 Nginx:

Then, restart Gitlab and Nginx:

sudo service gitlab restart
sudo service nginx restart

这为我解决了问题.

为了确认这是问题所在,我删除了 * 并输入了 IP,重新启动后它又坏了.把它放回去,它起作用了.

To confirm that this was the problem, I removed the * and put in the IP, restarted and it broke again. Put it back, and it worked.

我不完全确定为什么会修复它,但我希望这可以帮助那里的人;这是一个非常令人沮丧的问题.

I'm not completely sure why this fixes it, but I hope this helps somebody out there; this was a very frustrating problem to deal with.

这篇关于无法推送到新的 gitlab 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆