I am trying to deploy a war on remote Tomcat 8 but getting 401 (Unauthorized) error in the process.
[ERROR] Tomcat return http status err
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
You need to define the credentials for your "integration-tomcat" server; this is normally done in your ~/.m2/settings.xml file:
<servers>
<server>
<id>integration-tomcat</id>
<username>manager</username>
<password>manager</password>
</server>
</servers>