12

When using the hudson git plugin with https, how to I specify a password?

Marijn
  • 10,097
  • 5
  • 56
  • 78
bmargulies
  • 94,623
  • 39
  • 172
  • 299

2 Answers2

24

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.

Community
  • 1
  • 1
eis
  • 49,147
  • 13
  • 140
  • 191
4

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

Rubycut
  • 1,646
  • 2
  • 16
  • 24
  • link's broken nowadays - I wonder what information did it contain. – eis Feb 17 '15 at 08:22
  • 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