我已经配置了bitbucket将代码推向URL:https:// my-jenkins-in-aws/bitbucket-hook/
,我将200是我对此库的每个提交的状态代码,这可能意味着Webhook正在完成其工作。
但是在詹金斯(Jenkins),我看到身份验证失败了,如下以下
从2022年6月23日开始
使用策略:默认
[民意调查]上次构建的修订:修订800C0EA1GBB05DF9967B88888888888888341D87279367D4(REFS/REMOTES/ENELOTES/ORICT/DEV)
推荐的git工具是:无
未指定凭据
git-version#timeout = 10
git-version#'git版本2.34.1'
git ls-remote -h-h-https:// [email  preected] /path/path/to.git.git'返回状态代码128:
Stdout:
STDERR:远程:Bitbucket Cloud最近停止支持用于GIT身份验证的帐户密码。
远程:有关更多详细信息,请参见我们的社区帖子: https://atlassian.community/ T5/X/X/BA-P/1948231
远程:建议在大多数用例中使用应用程序密码,并且可以在您的个人设置中创建:
远程: https://bitbucket.org/account.org/account/settings/settings/app-passtings/app-passwords/
致命:身份验证失败了'https://bitbucket.org/path/to.git/'
:命令“ git ls -remote -h -h -https:// https:// href =” -cgi/l/电子邮件保护“ class =” __ cf_email__“ data-cfemail =” 10456375625E717D75507279647265737B756437B75643E7F6277F6277>
Stdout:
STDERR:远程:Bitbucket Cloud最近停止支持用于GIT身份验证的帐户密码。
远程:有关更多详细信息,请参见我们的社区帖子: https://atlassian.community/ T5/X/X/BA-P/1948231
远程:建议在大多数用例中使用应用程序密码,并且可以在您的个人设置中创建:
远程: https://bitbucket.org/account.org/account/settings/settings/app-passtings/app-passwords/
致命:身份验证失败了'https://bitbucket.org/path/to.git/'
如果我是从詹金斯手动构建的,它将克隆代码并正常构建而没有身份验证错误。
让我知道您是否对此有任何疑问。
感谢任何帮助:)
谢谢
Ravikiran HM
I have configured Bitbucket to push code to the URL: https://My-Jenkins-in-aws/bitbucket-hook/
and I see 200 as the status code for each commit I do to this repo which may mean webhook is doing its job.
But in Jenkins, I see Authentication failed as below
Started on Jun 23, 2022, 6:51:28 AM
Using strategy: Default
[poll] Last Built Revision: Revision 800c0ea1gbb05df9967b888367341d87279367d4 (refs/remotes/origin/dev)
The recommended git tool is: NONE
No credentials specified
git --version # timeout=10
git --version # 'git version 2.34.1'
git ls-remote -h -- https://[email protected]/path/to.git # timeout=10
FATAL: hudson.plugins.git.GitException: Command "git ls-remote -h -- https://[email protected]/path/to.git" returned status code 128:
stdout:
stderr: remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/path/to.git/'
hudson.plugins.git.GitException: Command "git ls-remote -h -- https://[email protected]/path/to/.git" returned status code 128:
stdout:
stderr: remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication.
remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
remote: App passwords are recommended for most use cases and can be created in your Personal settings:
remote: https://bitbucket.org/account/settings/app-passwords/
fatal: Authentication failed for 'https://bitbucket.org/path/to.git/'
If I build it manually from Jenkins, it clones the code and builds normally without an authentication error.
Let me know if you have any more questions about this.
Appreciate any help :)
Thanks,
Ravikiran HM
发布评论
评论(1)
好的,所以我看到您的问题是您正在尝试使用普通的Bitbucket密码,而此处不允许使用。错误日志点,所以去那里,您将找到一个为管道创建应用程序密码的选项。拥有应用程序密码后,将您的普通密码的所有实例替换为应用程序密码,一切都应该开始工作。请注意,应用程序密码应保持安全,因为它可以用作普通密码的替代方法。
另请注意,应用程序密码不会过期并提供限制性访问。如果有什么不清楚的话,请仔细阅读错误消息中显示的其他链接: httpps> https: //atlassian.community/t5/x/x/ba-p/1948231
Ok so I see that your problem is that you're trying to use a normal Bitbucket password which are not allowed here. The error log points at https://bitbucket.org/account/settings/app-passwords/, so go there and you will find an option to create an app password for your pipeline. Once you have the app password, replace all instances of your normal password with the app password and everything should start working. Note that the app password should be kept safe since it can be used as an alternative to your normal password.
Also note that the app password does not expire and gives restrictive access. If anything is unclear, read through the other link shown in the error message: https://atlassian.community/t5/x/x/ba-p/1948231