简体   繁体   中英

jenkins+maven ignoring git global config

I'm trying to run a maven build that utilizes frontend-maven-plugin to run bower. Bower in turn executes git from the commandline to download the dependencies. Our firewall blocks the git:// protocol, so I ran git config --global url."https://".insteadOf git:// . However, it appears that it is ignoring it:

[INFO] --- frontend-maven-plugin:0.0.26:bower (bower install) @ janus --- [INFO] Running 'bower install' in D:\\Jenkins\\workspace\\janus [INFO] bower bootstrap#~3.3.5 not-cached git://github.com/twbs/bootstrap.git#~3.3.5 [INFO] bower bootstrap#~3.3.5 resolve git://github.com/twbs/bootstrap.git#~3.3.5 [ERROR] bower bootstrap#~3.3.5 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.129]: errno=No error

I've fully updated and restarted Jenkins, but no luck. The same command executed from the commandline works correctly.

Figured it out. Jenkins is running on Windows under the LocalSystem account. The "global" git config is actually per-user.

  • Using psexec, run cmd as LocalService: psexec -i -s -d CMD
  • In the cmd prompt that opens, execute git config --global url."https://".insteadOf git://

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM