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

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

问题描述

下午好,

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



添加一个新的原产地远程像这样;

  git remote add origin git@1.2.3.4:project.git 

并尝试推送我得到以下内容:

 致命:'project.git'似乎不是git存储库
致命的:远程终端意外挂起

Gitlab安装行为与期望和可访问通过来自局域网的HTTP和SSH。



gitlab状态任务也可以正常返回

  bundle exec rake gitlab:app:status RAILS_ENV = production 

有人知道我在哪里应该现在看?难以置信。

编辑。

SSH密钥存在

我试图用 ssh://git@example.com/usr/local/project.git 样式添加git仓库

b $ b

解决方案

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



我在这个错误报告
$ b $

/ etc / nginx / sites-available / gitlab 中,有一行,如果您按照帮助评论,将有你的IP。改变它来听取 *:80 代替。它应该看起来像这样:

  listen *:80 default_server; #例如,侦听192.168.1.1:80; 

然后,重新启动Gitlab和Nginx:

  sudo service gitlab restart 
sudo service nginx restart

为我解决了这个问题。



为了确认这是个问题,我删除了 * 在IP中,重新启动,并再次爆发。把它放回去,它的工作。



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

Good afternoon all,

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

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 install is behaving as expecting and accessible via HTTP and SSH from the LAN.

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.

edit.

SSH keys are present

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.

I found the solution in one of the comments in this bug report.

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;

Then, restart Gitlab and Nginx:

sudo service gitlab restart
sudo service nginx restart

That resolved the problem for me.

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天全站免登陆