r/javahelp • u/No-Kaleidoscope-9711 • Nov 21 '25
Maven help
Why I’m I getting this error when I’m passing my GitHub PAT token to the SCM release plugin so it can go into my repo and increment the project version and append it with snapshot? The build runs on AzureDevops agents and is meant to push the artifact to aws codeartifact. Really lost can’t see why it fails to auth? I'm a junior dev and all my team cant figure out believe it or not.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:3.0.1:prepare (default-cli) on project : Unable to commit files [ERROR] Provider message: [ERROR] The git-push command failed. [ERROR] Command output: [ERROR] remote: Invalid username or token. Password authentication is not supported for Git operations. [ERROR] fatal: Authentication failed for 'https://github.com//*******.git/' [ERROR] -> [Help 1]
<scm> <connection>scm:git:https://USER_NAME:${env.GITHUB_TOKEN}@github.com/org/repo.git</connection> <developerConnection>scm:git:https://USER_NAME:${env.GITHUB_TOKEN}@github.com/org/repo.git</developerConnection> <tag>project-name-1.0.0-SNAPSHOT</tag> </scm>
View all comments
1
u/Dashing_McHandsome Nov 21 '25 edited Nov 21 '25
I have two comments here:
Why are you running the release plugin locally with your own token? This should be something that is done by your CI/CD pipeline. If you're on GitHub, then these days that would typically be a GitHub action. There are other ways to achieve this as well.Edit: sorry, I reread the post and saw you are running the build on Azure build agents. This probably seems fine.