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
Show parent comment
1
u/No-Kaleidoscope-9711 Nov 21 '25
Thank you for the reply. So this is the first time a maven project is being run on these Azure agents, the agents didn't ever need write access to Github before a Java project was introduced, hence the use of a PAT for testing the release plugin! And yes, the token has read and write access to the repo it needs.