You have to check what settings are maven taking during the deployment of the artifacts by using this command:
mvn help:effective-settings
Sometimes it can happen that you are using local settings and global settings (taking first the provided by the maven installation and then the provided by the repository), but maven is not recognizing both. With this command, you can verify the actual settings maven is taking during the deployment. In addition, you can locate the actual file maven is taking and, as a consequence, modify the file properly (with vim, for example) according to the configuration needed by the server.
Remember that there are two locations where a settings.xml file may live:
Maven installation directory
$M2_HOME/conf/settings.xml
User-specific settings file
~/.m2/settings.xml
If both files exists, their contents gets merged, with the user-specific settings.xml being dominant. https://maven.apache.org/settings.html