When using the hudson git plugin with https, how to I specify a password?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can't. It is bug in git plugin, but there is fork that fixes it, see:
http://issues.hudson-ci.org/browse/HUDSON-3807
回答2:
The status as of this writing is that you can.
There are at least two ways of doing it:
- specifying it in the url (https://user:pass@yourdomain.com/yourrepo)
- specifying it in .netrc file for the user env that is running the Hudson build (_netrc on windows)
netrc approach is by default a plain text file. If needed, it can be encrypted as explained in this answer, or just be readable for that one user through permissions.