【问题标题】:Can't push to new gitlab install无法推送到新的 gitlab 安装
【发布时间】:2012-10-25 14:49:03
【问题描述】:

大家下午好,

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

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

git remote add origin git@1.2.3.4:project.git

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

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

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

gitlab status 任务也正常返回

bundle exec rake gitlab:app:status RAILS_ENV=production

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

编辑。

SSH 密钥存在

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

【问题讨论】:

    标签: git vagrant gitlab


    【解决方案1】:

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

    我在this bug report 的一个cmets 中找到了解决方案。

    /etc/nginx/sites-available/gitlab 中有一行,如果您关注有帮助的 cmets,将获得您的 IP。改为收听*:80。它应该是这样的:

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

    然后,重启 Gitlab 和 Nginx:

    sudo service gitlab restart
    sudo service nginx restart
    

    这为我解决了问题。

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

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

    【讨论】:

      【解决方案2】:

      作为您尝试连接的同一用户执行以下操作:

      ssh git@1.2.3.4 "ls /usr/local/project.git"
      

      并确保你看到了 repo。

      然后添加做一个 git clone:

      git clone git@1.2.3.4:/usr/local/project.git
      

      作为同一个用户。

      我怀疑你没有正确的 repo 位置。

      【讨论】:

      • 你是对的,当我通过前端创建一个新项目时,Gitlab 没有在 /home/git/repositories/ 中创建 repo 但我可以克隆 gitolite-admin .git 作为安装的一部分获得
      • 对此有任何解决方案吗?我也有这个问题。我的仓库显然是在服务器上的/home/git/repositories/my_username 中创建的(通过 gitlab 前端),但在尝试推送时找不到
      猜你喜欢
      • 1970-01-01
      • 2015-12-25
      • 1970-01-01
      • 1970-01-01
      • 2013-12-04
      • 2018-03-10
      • 1970-01-01
      • 1970-01-01
      • 2014-08-25
      相关资源
      最近更新 更多