When using the hudson git plugin with https, how to I specify a password?
Asked
Active
Viewed 1.3k times
2 Answers
24
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.
-
1Useful answer; [this post](http://dustint.com/post/299/hudson-jenkins-and-git-http-authentication) has more details on how to achieve this on Linux and Windows – Marijn Jan 18 '13 at 08:49
-
First answer where I saw someone put the username/password in the url. Thanks. – Gowiem May 21 '13 at 19:11
-
I also forgot that option #1 is possible. . . dirty, but works for me. – Jasper Blues Dec 02 '13 at 05:30
-
specifying in the url as above worked for me - thanks – Biscuit128 Jul 18 '14 at 13:02
4
You can't. It is bug in git plugin, but there is fork that fixes it, see:

Rubycut
- 1,646
- 2
- 16
- 24
-
-
See that in the Wayback Machine for [HUDSON-3807](https://web.archive.org/web/20130313085902/http://issues.hudson-ci.org/browse/HUDSON-3807), and [HUDSON-7091]() and [HUDSON-7346]() too, while you're at it. Typical tail-chasing, "Cannot reproduce" and environment creep. – Codex24 Jun 22 '15 at 19:10
-
That is, [HUDSON-7091](https://web.archive.org/web/20101229120324/http://issues.hudson-ci.org/browse/HUDSON-7091) and [HUDSON-7346](https://web.archive.org/web/20101011024758/http://issues.hudson-ci.org/browse/HUDSON-7346) too, while you're at it. I am working around with [Git credential.helper functionality](http://git-scm.com/docs/gitcredentials/1.8.2.1), and forcing the master server to [use native Git CLI](https://issues.jenkins-ci.org/browse/JENKINS-20261) – Codex24 Jun 22 '15 at 19:23