jenkins使用Git为源码管理(windows master && linux slave)
2015-10-10 18:20
976 查看
作为一个不太经常总结的人,工作以来碰到过太多问题!往往解决之后没有有效记录,导致再次碰到需要重新查资料解决。现在改变下习惯,努力搞的了技术。
公司最近提倡开源(以前啥都机密,即使开源也没改变多少),代码从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
这样方便在windows和linux中通用
2.2
linux中安装的git版本过低,需要升级版本
2.3
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更新进行自动构建
本文出自 “搞不了技术” 博客,请务必保留此出处http://jdcdyjy.blog.51cto.com/10778026/1701639
公司最近提倡开源(以前啥都机密,即使开源也没改变多少),代码从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更新进行自动构建
本文出自 “搞不了技术” 博客,请务必保留此出处http://jdcdyjy.blog.51cto.com/10778026/1701639
相关文章推荐
- 通过zssh在服务器和本地之间上传和下载文件
- Linux-CentOS7 KDE 中文语言支持
- Linux进程间通信方式--信号,管道,消息队列,信号量,共享内存
- java 获取进程ID 物理内存 cpu使用百分比(linux环境)
- linux 高并发socket通信模型
- linux下vim不显示高亮解决方案
- Linux中/var空间不足的解决办法
- linux设备树使用手册
- Linux下如何修改MySQL物理目录
- linux 信号注册处理发送signal
- Linux Pmap 命令:查看进程用了多少内存
- linux笔记 第二天 Linux系统入门及基础命令
- linux sar
- Linux 下系统调用的三种方法
- linux下利用vsftpd搭建ftp服务器
- GitHub Linux下使用方法
- Linux系统调用和库函数调用的区别
- Linux 文件操作总结
- linux sysbench
- linux 新建分区 、格式化 并挂载的命令