Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
面向用户的Gitlab工作流和配置 上下文/信息_Git_Gitolite_Gitlab - Fatal编程技术网

面向用户的Gitlab工作流和配置 上下文/信息

面向用户的Gitlab工作流和配置 上下文/信息,git,gitolite,gitlab,Git,Gitolite,Gitlab,我在ubuntu 12.04上安装了gitlab,如本官方页面所述: 安装后,我可以访问http://machine_ip:3000具有以下凭据: admin@local.host 艾维尔!铁 在我的机器上,我有以下用户: -git(在教程中没有设置密码) -gitlab(设置为教程中的自动) -我的用户名(我作为root用户使用的普通用户) 在gitlab的web界面中,当被请求时,我在我的_用户名上生成了一个公共rsa密钥,并将其粘贴在那里 然后,我继续在/home/my_username

我在ubuntu 12.04上安装了gitlab,如本官方页面所述:

安装后,我可以访问
http://machine_ip:3000
具有以下凭据:

admin@local.host

艾维尔!铁

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

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

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

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中的授权密钥中

但是,当我尝试使用源位置克隆存储库时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(我承认有点匆忙),解决了这个问题


谢谢大家。

我首先通过GitLab接口本身声明repo测试,并克隆该repo。
(而不是在本地初始化回购并尝试推送)


正如前面提到的,使用和升级GitLab就足以解决这个问题

我在gitlab中创建了一个新项目,并试图克隆它。我仍然得到相同的“test.git”似乎不是git存储库。@rsavu
ssh-T是什么git@machine_ip:test.git
从用于尝试克隆该
test.git
repo的客户端执行时返回?它应该返回gitolite'hello'消息,如(from,这在您的案例中可能很有趣)