Maven JGitFlow Authentication for HTTPS

I'm having trouble authenticating with BitBucket via HTTPS through a plugin Maven JGitFlow, run git-bashon Windows.

Error message: "Authentication required, but CredentialsProvider account not registered." The suggestions that I saw seem to suggest that I have access to the JGit code itself as a developer.

I had no problems executing git commands directly (I use git-credential-winstore). Also, when I provided my username and password in POM explicitly in the pom.xml file, it also worked.

However, I would not want my password to be uploaded to my BitBucket repository, and I am looking for a plugin method JGitFlowfor authentication in the same way as git itself.

What am I doing wrong, and how can I fix it?

+4
source share
1 answer

The following JGitFlow Maven plugin configuration works

<plugin>
    <groupId>external.atlassian.jgitflow</groupId>
    <artifactId>jgitflow-maven-plugin</artifactId>
    <version>1.0-m5.1</version>
    <configuration>
        <username>${git.user}</username>
        <password>${git.password}</password>
    </configuration>
</plugin>

Call it from the command line with username and password as Java System properties, i.e. using -Dgit.user=<user>and -Dgit.password=<password>for example.

mvn -Dgit.user=user@bitbucket.com -Dgit.password = jgitflow secret: release-start

Note: the plugin must really be updated using Maven CredentialsProvider, which can get credentials from the credential parser settings.xmland / or w20>, which uses the same mechanism as Git on the command line.

+6
source

All Articles