设为首页 收藏本站
查看: 1063|回复: 0

[经验分享] gitlab & gerrit & git & repo & jenkins

[复制链接]
累计签到:2 天
连续签到:1 天
发表于 2018-1-11 06:26:31 | 显示全部楼层 |阅读模式
  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  ! [remote rejected] 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
'[127.0.0.1]:29418 ([127.0.0.1]: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 '[127.0.0.1]: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、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-433746-1-1.html 上篇帖子: GitLab版本管理(转) 下篇帖子: gitlab安装教程
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表