Using Maven git-commit-id-plugin in Pipelines


I'm trying to run my maven build script in Pipelines, but it fails with this error message:



[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.1:revision (default) on project omc-server: Could not complete Mojo execution... Illegal character in authority at index 8: https://x-token-auth:{access_token} -> [Help 1]

any ideas?

Thanks for yout help!

4 answers

1 accepted

3 votes
Accepted answer

Hi Aldo,

It looks like you're using a maven plugin (git-commit-id-plugin) that requires a valid origin url in your local git configuration.

If this is not an essential plugin for your build then the easiest way to fix the issue is to disable the plugin (perhaps move the plugin into a maven profile that is not enabled when your build is run in Pipelines).

If it is an essential plugin then you'll need to set a valid origin url and probably set up ssh authentication so that your build can communicate with the remote repository.

Initially I would try just setting a valid origin url at the beginning of your script:

git remote set-url origin

However there's a good chance this still won't work if the plugin needs to actually communicate with the remote server. It may fail with an authentication error or the build may hang waiting for user input (be sure to watch the build and stop it manually if it hangs).

If that doesn't work then you'll need to set an ssh-based origin url and also set up ssh authentication.

The ssh-based url will look something like this:

git remote set-url origin

And the following guides describe how to set up ssh authentication:




Thank you very much: I just needed to retrieve the local commit id, so simply setting the origin url did the trick.

Yes, thank you. This solved the problem for us as well.

0 votes

Would you be able to paste in the contents of your bitbucket-pipelines.yml? 

I'm using the unmodified standard template for a maven project:

# This is a sample build configuration for Maven.
# Check our guides at for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: maven:3.3.3
    - step:
        script: # Modify the commands below to build your repository.
          - mvn clean install
0 votes

Hi Aldo,
This looks like it's probably caused by an error as a result of a plugin overriding a default lifecycle hook in your pom.xml. I'd recommend trying to mount and run the build on a local docker container to see whether it works and start debugging. If there are still problems please raise an issue at so we can investigate further.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

672 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you