chunjihong 发表于 2018-1-11 06:26:31

gitlab & gerrit & git & repo & jenkins

  Omnibus GitLab documentation(中文安装说明)

在自己的服务器上部署 GitLab 社区版->较为全面

GIT & REPO & GERRIT (三)

gitlab+gerrit+jenkins持续集成框架 (安装后无法访问首页)
  清华大学开源软件镜像站(ubuntu14.04)
  离线包官方下载地址

gitlab / gitlab-ce/ ubuntu / precise
  

GitLab Community Edition and GitLab CI (including NGINX, Postgres, Redis)  

  gitlab优势

Advantages


[*]Unlimited repositories
[*]Unlimited private collaborators
[*]10GB disk space per project (including Git LFS)
[*]Unlimited total disk space
[*]Completely free, no credit card required
[*]Unlimited CI Runners to do parallel testing
[*]Alternate SSH port for git+ssh (443)

烤鸭的gerrit使用总结

Jenkins Gitlab持续集成打包平台搭建

转:Gerrit 学习
  相关问题解决方案:
  1、安装ee版本后,无法访问gitlab首页问题
  原因分析:可能于apache已经占用80端口有关系。此时将默认安装的nginx端口号修改掉即可
  

1、修改/opt/gitlab/embedded/conf/nginx.conf中的 listen 80为8080  
2、编辑/etc/gitlab/gitlab.rb   将external_url修改为external_url 'http://127.0.0.1/gitlab'
  
3、sudo gitlab-ctl reconfigure
  
4、此时即可访问http://127.0.0.1:8080/gitlab页面
  

  Repo仓库搭建

如何搭建Repo服务器端

Git服务器在Ubuntu中的搭建

Gerrit代码审核服务器搭建全过程

Git服务器Gitosis安装设置

Linux - gitHub- Gitosis
  Gerrit的搭建及第一次使用注意事项

烤鸭的gerrit使用总结

android repo中manifest.xml的详解

Gerrit工作流
  Gerrit简易安装入门

Gerrit工作原理和流程
  gerrit搭建及使用过程中碰到的问题:
  1、将代码直接推送到git中(不经过gerrit审核)时,出现验证失败的错误(密码使用了gerrit的登陆密码):
  

yingc@yingc:~/gerrit_test/test$ git push -u origin master  
Username
for 'http://127.0.0.1:8081': scm  
Password
for 'http://scm@127.0.0.1:8081':  
fatal: Authentication failed
  

  解决方法: 此时不知道为何不能使用gerrit中的登陆密码,需要登陆到gerrit,然后切换到 用户名->Setting->Http Password,将其中的密码拷贝即可
  2、将当前修改推送到gerrit审核时(命令如:git push origin HEAD:refs/for/master),有以下错误:
  

yingc@yingc:~/gerrit_test/test$ git push origin HEAD:refs/for/master  
Username
for 'http://127.0.0.1:8081': scm  
Password
for 'http://scm@127.0.0.1:8081':  
remote: Processing changes: refs:
1, done  
remote: ERROR: missing Change
-Id in commit message footer  
remote:
  
remote: Hint: To automatically insert Change
-Id, install the hook:  
remote:   gitdir
=$(git rev-parse --git-dir); scp -p -P 29418 scm@127.0.0.1:hooks/commit-msg ${gitdir}/hooks/  
remote: And
then amend the commit:  
remote:   git commit
--amend  
remote:
  
To http:
//127.0.0.1:8081/test  ! HEAD -> refs/for/master (missing Change-Id in commit message footer)
  
error: failed to push some refs to 'http://127.0.0.1:8081/test'
  

  解决方法:此时其中的提示信息Hint已经给出了解决意见。此时执行如下命令
  

1、gitdir=$(git rev-parse --git-dir); scp -p -P 29418 scm@127.0.0.1:hooks/commit-msg ${gitdir}/hooks/  
2、git ci --amend    #此时会进入到vim中,直接退出或修改下log信息保存退出
  
3、amend后再次推送到gerrit服务器:git push origin HEAD:refs/for/master
  

  参考网址:

remote: ERROR: missing Change-Id in commit message footer
  相关说明:
  在上面解决方法第一条命令执行后,出现如下错误:
  

yingc@yingc:~/gerrit_test/test$ gitdir=$(git rev-parse --git-dir); scp -p -P 29418 scm@127.0.0.1:hooks/commit-msg ${gitdir}/hooks/  
The authenticity of host
':29418 (:29418)' can't be established.  
RSA key fingerprint is 24:00:70:46:2e:32:1b:eb:bc:06:6a:66:a1:7c:b0:83.
  
Are you sure you want to continue connecting (yes/no)? yes
  
Warning: Permanently added ':29418' (RSA) to the list of known hosts.
  
Permission denied (publickey).
  

  此时执行cat ~/.ssh/id_rsa.pub命令(前提其已经生成,ssh-keygen -t rsa命令),将其中的内容拷贝粘贴到 用户名->Setting->SSH Public Keys中并保存。
  保存之后再次执行该命令,发现有如下错误:
  

yingc@yingc:~/gerrit_test/test$ gitdir=$(git rev-parse --git-dir); scp -p -P 29418 scm@127.0.0.1:hooks/commit-msg ${gitdir}/hooks/  
Agent admitted failure to sign using the key.
  
Permission denied (publickey).
  

  此时执行命令: ssh-add   ~/.ssh/id_rsa,参考网址如下:

解决 Agent admitted failure to sign using the key 问题 with ssh

使用git push命令提交到gerrit:
  

git push 远程地址 本地分支:refs/for/远程分支  


gerrit添加新用户
  aa
页: [1]
查看完整版本: gitlab & gerrit & git & repo & jenkins