【问题标题】:Gitlab workflow and configuration for users用户的 Gitlab 工作流程和配置
【发布时间】:2012-09-26 08:38:45
【问题描述】:

上下文/信息

我在 ubuntu 12.04 上安装了 gitlab,如官方页面所述: https://github.com/gitlabhq/gitlabhq/blob/stable/doc/installation.md

安装后,我可以使用凭据访问http://machine_ip:3000 的网络界面:

admin@local.host

5iveL!fe

在我的机器上,我有以下用户: - git(在教程中设置为没有密码) - gitlab(在教程中设置自动) - my_username(我作为root使用的普通用户)

在 gitlab 的 web 界面中,当请求时,我在 my_username 上生成了一个公共 rsa 密钥并将其粘贴在那里。

然后我继续使用 git init 和 git remote add origin 在 /home/my_username/test 中创建一个存储库,如教程中所述。当我尝试推送我的提交时,我收到以下错误:

To git@localhost:test.git
! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@localhost:test.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

我告诉你这一切是为了更好地了解我试图实现的目标以及我收到的错误消息。

问题

在开发人员的机器上,我安装了 putty、pageant、puttygen 和 msysgit。我在 gitlab 的界面中生成了一个与新用户关联的密钥。另外,我将 GIT_SSH 设置为使用 plink 以便让 msysgit 使用 pageant(它为连接提供密钥)。

我可以不使用密码连接到 git@machine_ip,因此密钥被添加到 git 中的 authorized_keys 中。

但是,当我尝试使用源位置 git@machine_ip:test.git 克隆存储库时,我收到以下错误消息:

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

我不知道我在这里做错了什么。我是否应该做一些不同的事情(创建一个新项目,以不同​​的方式设置存储库,在 gitlab 中添加一个新用户及其密钥)等等。

你能提供一些帮助吗?

更新信息

我通过使用交钥匙 gitlab 设备重新安装机器然后升级(我承认有点忙)gitlab 解决了这个问题。

谢谢大家。

【问题讨论】:

    标签: git gitolite gitlab


    【解决方案1】:

    我将首先通过 GitLab 接口本身声明 repo 测试,然后克隆该 repo。
    (而不是在本地初始化一个 repo,然后尝试推送它)

    正如OP rsavu 提到的,使用turnkey GitLab appliance 并升级GitLab 足以解决问题。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-02
    • 1970-01-01
    • 1970-01-01
    • 2019-07-14
    • 1970-01-01
    • 1970-01-01
    • 2017-02-09
    • 2020-05-16
    相关资源
    最近更新 更多