我尝试在一些免费的ec2实例上设置jenkins,尽管jenkins正常运行,但是在运行curl localhost:8080后仍出现以下错误。
**<html><head><meta http-equiv='refresh' content='1;url=/login?from=%2F'/><script>window.location.replace('/login?from=%2F');</script></head><body style='background-color:white; color:white;'>
Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:
Permission you need to have (but didn't): hudson.model.Hudson.Administer
-->
</body></html>**
请提供帮助。
答案 0 :(得分:0)
似乎无法进行身份验证,因为您未提供身份验证详细信息。提供您的詹金斯用户名和密码 curl -X POST http://username:password@localhost:8080/job/test/build
按照下面的链接获取更多信息。 https://support.cloudbees.com/hc/en-us/articles/218889337-How-to-build-a-job-using-the-REST-API-and-cURL-
https://jenkinsapi.readthedocs.io/en/latest/using_jenkinsapi.html#
如果您想通过浏览器使用詹金斯,请使用ec2公共IP或弹性IP,即 PUBLIC_IP:8080