I recently published my library to maven central and faced the exact same issue. This stackoverflow answer helped:
Remove the below line from signing block
useInMemoryPgpKeys(signingKey, signingPassword)
Though in your case key exists on ubuntu, in my case openpgp worked.