hudson git https password, how do I specify it?

2019-02-16 13:40发布

问题:

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:

  1. specifying it in the url (https://user:pass@yourdomain.com/yourrepo)
  2. 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.