jenkins使用Git为源码管理(windows master && linux slave)
2017-05-09 18:56
513 查看
作为一个不太经常总结的人,工作以来碰到过太多问题!往往解决之后没有有效记录,导致再次碰到需要重新查资料解决。现在改变下习惯,努力搞的了技术。
公司最近提倡开源(以前啥都机密,即使开源也没改变多少),代码从SVN迁移至Git管理,这样导致原来记录项目日志的wiki持续集成job需要重新配置。之前的设置为:每分钟检查SVN变化,有变化就执行编译发布。改为Git后,碰到坑坑洼洼,一并列在下面。
jenkins的Git插件安装
git plugin,git client plugin,github plugin,往往安装的时候会把关联依赖的一遍进行安装。
2. Windows Master && Linux Slave中Git的配置
windows上安装git,很简单;linux上安装git,“很简单”。但是git problems for windows master and linux slave == 头大!
2.1
这个问题很初级,在jenkins的系统配置中把Git的配置改为
这样方便在windows和linux中通用
2.2
linux中安装的git版本过低,需要升级版本
2.3
升级版本之后,原因为编译时,libcurl未安装等,具体步骤如下:
a. 下载需要安装的git版本
b. 解压缩
c. yum install libcurl-devel
d. yum install perl-ExtUtils-MakeMaker package(Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.)
e. yum install tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel(MSGFMT po/de.msg make[1]: *** [po/de.msg]
Error 127)
f. ./configer --with-curl --with-expat
g. make && make install
2.4
Git Polling Log提示“FATAL: hudson.plugins.git.GitException: Error performing command: C:\Windows\TEMP\hudson11232435”,且无法检测到git更新进行自动构建
公司最近提倡开源(以前啥都机密,即使开源也没改变多少),代码从SVN迁移至Git管理,这样导致原来记录项目日志的wiki持续集成job需要重新配置。之前的设置为:每分钟检查SVN变化,有变化就执行编译发布。改为Git后,碰到坑坑洼洼,一并列在下面。
jenkins的Git插件安装
git plugin,git client plugin,github plugin,往往安装的时候会把关联依赖的一遍进行安装。
2. Windows Master && Linux Slave中Git的配置
windows上安装git,很简单;linux上安装git,“很简单”。但是git problems for windows master and linux slave == 头大!
2.1
Cannot run program "C:\Program Files (x86)\Git\bin" (in directory "/home/jenkins/workspace/Wiki_Git")
这个问题很初级,在jenkins的系统配置中把Git的配置改为
这样方便在windows和linux中通用
2.2
ERROR: Error fetching remote repo 'origin'hudson.plugins.git.GitException: Failed to fetch from http://source.jd.com/app/im4.1-wiki.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1259) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) at hudson.model.Run.execute(Run.java:1759) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)Caused by: hudson.plugins.git.GitException: Command "/usr/libexec/git-core/git config --local credential.username guoweiwei" returned status code 129: stdout: stderr: error: unknown option `local' usage: git config [options]
linux中安装的git版本过低,需要升级版本
2.3
fatal: Unable to find remote helper for 'http'
升级版本之后,原因为编译时,libcurl未安装等,具体步骤如下:
a. 下载需要安装的git版本
b. 解压缩
c. yum install libcurl-devel
d. yum install perl-ExtUtils-MakeMaker package(Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.)
e. yum install tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel(MSGFMT po/de.msg make[1]: *** [po/de.msg]
Error 127)
f. ./configer --with-curl --with-expat
g. make && make install
2.4
Git Polling Log提示“FATAL: hudson.plugins.git.GitException: Error performing command: C:\Windows\TEMP\hudson11232435”,且无法检测到git更新进行自动构建
相关文章推荐
- jenkins使用Git为源码管理(windows master && linux slave)
- linux jenkins master上管理windows jenkins slave
- windows下使用Jenkins搭建CI持续集成平台(版本源码管理使用SVN)
- 【Jenkins系列之三】在Windows上安装Jenkins master & slave
- 【Linux】Jenkins+Git源码管理(三)
- Jenkins环境搭建(Linux Master & Windows Slave)
- jenkins使用git SCM时changelog乱码(Jenkins部署在Linux上,任务在Windows Slave上构建)
- Jenkins on Linux(Master) talk with Windows server 2012 R2 (Slave)
- 如何在linux和windows下使用版本管理工具git 详解
- 22.1-22.6 代码管理平台,安装svn以及使用(linux,windows),单机使用git
- Linux(Ubuntu)环境MYSQL->master/slave主从同步设置以及注意事项
- 在windows下使用git下载android源码
- windows下使用git管理github项目
- 在Windows环境中使用版本管理工具Git
- 一步一步学习嵌入式Linux开发-C3-使用git管理项目1
- 在windows下使用git客户端,github源码库以及eclipse的git插件-egit的使用
- 在Windows环境中使用版本管理工具Git
- Git_windows下使用git管理github项目
- 在Windows环境中使用版本管理工具Git [转]
- Git 命令参数及用法详解 & Linux编程环境下版本控制 Git使用