401 (Unauthorized) error while using maven to deploy war to remote Tomcat 8

前端 未结 2 1750
既然无缘
既然无缘 2021-01-16 23:18

I am trying to deploy a war on remote Tomcat 8 but getting 401 (Unauthorized) error in the process.

Error Log

[ERROR] Tomcat return http status err         


        
2条回答
  •  旧巷少年郎
    2021-01-16 23:27

    In case this helps someone in the future, I discovered that Tomcat would return a 401 if the password in tomcat-users.xml started with a number instead of letter. This was only the case when trying to do the deploy via curl or via GitLab using cargo maven plugin. (it worked fine running the maven deploy from within Eclipse).

    Changing the password to start with a letter fixed things for curl and when deploying from GitLab

提交回复
热议问题