Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8645743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:37:40+00:00 2026-06-12T12:37:40+00:00

While trying to push a release to Maven, I am getting several errors including:

  • 0

While trying to push a release to Maven, I am getting several errors including:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

and

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to commit files
Provider message:
The git-commit command failed.
Command output:
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:37:42+00:00Added an answer on June 12, 2026 at 12:37 pm

    So this is really just a brain dump of the process I had to go through to push a release for an open source project hosted on git into the Sonatype maven repo. Almost everything here has been covered in separate StackOverflow questions, but for those (like me) doing this for the first time, an overview is useful.

    The whole process is actually just two commands:

    • mvn release:prepare
    • mvn release:perform

    However, it’s the fiddly details that caught me out. So this is the process I needed to follow:

    1. Check in all changes to your project. Maven will complain if there any any unpushed local changes.
    2. Make sure you have a SSH public key in git. This will fix or prevent the Permission denied (publickey). error.
    3. Make sure you project’s version is a SNAPSHOT and delete the release.properties file if it exists. This will fix or prevent the The git-commit command failed. error.
    4. Run the Maven commands listed above.
    5. I added the GPG key details to ~/.m2/settings.xm. The complete file is listed below.
    6. At this point you will have unsigned artefacts waiting in the staging area. I was uploading a parent POM file only, so I needed to sign then with the command mvn -Pgpg gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=pom.xml -Dfile=pom.xml
    7. Now release it with the instructions at https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8a.ReleaseIt

    This is the ~/.m2/settings.xml file.

    <settings>
        <servers>
            <server>
                <id>sonatype-nexus-snapshots</id>
                <username>username</username>
                <password>password</password>
            </server>
            <server>
                <id>sonatype-nexus-staging</id>
                <username>username</username>
                <password>password</password>
            </server>
        </servers>
        <profiles>
            <profile>
                <id>gpg</id>
                <properties>
                    <gpg.passphrase>password</gpg.passphrase>
                    <gpg.keyname>12345678</gpg.keyname>
                </properties>
            </profile>
        </profiles>
    </settings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting permissions errors while trying to deploy my rails app to a friend's
While trying to git push heroku master, I keep getting the error : Counting
While trying to search with id sorting (and paginating) im getting from the log:
I'm trying to change view upon receive a push notification while the app is
I am getting this error when I am trying to push to the Heroku
I'm trying to push to bitbucket, a changeset with several thousand files which were
So I'm using GIT, trying to push code to my remote server. on a
I'm getting some major grief while trying to extract the device token in my
I'm getting the following error while trying to run an iOS app I'm developing:
While trying to build the mysql2 gem with ruby 1.9.2-p320 on Fedora 16, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.