hudson git https 密码,我该如何指定?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3363606/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
hudson git https password, how do I specify it?
提问by bmargulies
When using the hudson git plugin with https, how to I specify a password?
使用带有 https 的 hudson git 插件时,如何指定密码?
采纳答案by Rubycut
You can't. It is bug in git plugin, but there is fork that fixes it, see:
你不能。这是 git 插件中的错误,但是有一个 fork 修复了它,请参阅:
回答by eis
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:[email protected]/yourrepo)
- specifying it in .netrc file for the user env that is running the Hudson build (_netrc on windows)
- 在 url ( https://user:[email protected]/yourrepo) 中指定它
- 在 .netrc 文件中为运行 Hudson 构建的用户环境指定它(Windows 上的 _netrc)
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.
netrc 方法默认是纯文本文件。如果需要,可以按照本答案中的说明对其进行加密,或者仅通过权限对该用户可读。