Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven Release Plugin hangs at git push [duplicate]

Tags:

java

git

maven

I'm following instructions laid out here on how to publish to Sonatype and I'm running into an issue with the mvn release:prepare step. It get's up to this step then it stalls:

[INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD"
[INFO] Working directory: C:\Users\Nicholas\git\Maven-Mule-REST-Plugin
[INFO] Executing: cmd.exe /X /C "git push [email protected]:NicholasAStuart/Maven-Mule-REST-Plugin.git master:master"
[INFO] Working directory: C:\Users\Nicholas\git\Maven-Mule-REST-Plugin

I've manually run that command myself and it asks for my passphrase, but I'm assuming that is what is stalling the release plugin. This is a Windows machine. How can I have this either prompt me, or can I provide this in the CLI argument to mvn?

like image 778
Nicholas Avatar asked Oct 30 '14 03:10

Nicholas


2 Answers

the maven-release-plugin shows the same problem behavior when pushing to a non ssh secured repository too (like any own configured http or https repository in a repo manager like Artifactory) if you have just missed to add the credentials to the Maven process.

so if you use http(s) always check you have added the credentials to the Maven process as parameters for the Maven Release plugin like...

mvn release:prepare -Dusername=ANYBODY -Dpassword=XXX
like image 153
Hannes Kogler Avatar answered Oct 22 '22 12:10

Hannes Kogler


You would need to run an ssh-agent, in order to get that passphrase automatically provided for you.

ssh-add "/c/Users/YourUsename/.ssh/id_rsa"

See for more: "Maven - Error Releasing Code to GitHub (Hangs After Push)".

like image 1
VonC Avatar answered Oct 22 '22 14:10

VonC