axion-release-plugin icon indicating copy to clipboard operation
axion-release-plugin copied to clipboard

Cannot sign commits - missing credentials provider

Open cwrau opened this issue 5 years ago • 4 comments
trafficstars

My .gitconfig is configured in the following way:

[user]
  signingkey = 6ADCBD3FF206F341D2CF8E2C49D1B5ACCF53CA1C
[commit]
  gpgsign = true

I have a hook which modifies a package.json and then commits it with:

    val jsonFile = project.file("package.json")
    hooks.preReleaseHooks.add(ReleaseHookAction { context: HookContext ->
        val packageJson = json.parseToJsonElement(jsonFile.readText()).jsonObject.toMutableMap()

        packageJson["version"] = JsonPrimitive(
            project.rootProject.version.toString().toVersion().toString(Semver.Style.COMPACT)
        )

        jsonFile.writeText(json.encodeToString(packageJson))
        context.commit(listOf(jsonFile.canonicalPath), "Bump '${project.name}'s 'package.json's version")

But when I use gradle release, the plugin crashes with the following message:

> Task :verifyRelease
Looking for uncommitted changes.. 
Skipping ahead of remote check
Checking for snapshot versions.. 

> Task :release FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':release'.
> missing credentials provider

cwrau avatar Nov 19 '20 10:11 cwrau

@cwrau I'm going to update jgit (I also had problems with signing commits, but mine was resolved just by updating) #370 I'll get back to you with a snapshot release to test, ok? :)

bgalek avatar Feb 12 '21 17:02 bgalek

That would be awesome, thanks for your help!

cwrau avatar Feb 13 '21 02:02 cwrau

@cwrau could you test it simply by cloning this repository and building a snapshot from master branch? you can then publish it to your local maven for testing ;)

bgalek avatar Feb 25 '21 21:02 bgalek

Sorry for taking so long!

When trying the new version, I get the following error;

shadow.org.eclipse.jgit.api.errors.ServiceUnavailableException: Signing service is not available

When I tried to debug, I removed all shadowing, as I couldn't really debug with it.

That fixed that problem, but then I got

unable to find associated secret key for public key: 49d1b5accf53ca1c

Which is funnily the same error I get when not running the locally built version 😅

cwrau avatar Apr 21 '21 13:04 cwrau