I’m trying to publish my npm module to a Nexus repository, but when I use npm publish, it fails due to authentication issues. Since the repository is hosted on AWS, it’s redirecting to a different authentication method, and I want to use basic authentication for the upload. I also attempted to use the following curl command:
curl -u "$NEXUS_USERNAME:$NEXUS_PASSWORD" -X POST \
-F "rfile=@./$PACKAGE_TGZ" \
"/service/rest/v1/components?repository=npm-internal"
However, this resulted in a 405 error. What other options should I try?