Hello!
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... java.net.URISyntaxException: Illegal character in authority at index 8: https://x-token-auth:{access_token}@bitbucket.org/imavis/omc.git -> [Help 1]
any ideas?
Thanks for yout help!
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 https://bitbucket.org/imavis/omc.git
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 git@bitbucket.org:imavis/omc.git
And the following guides describe how to set up ssh authentication:
https://answers.atlassian.com/questions/39429257
https://answers.atlassian.com/questions/39243415
cheers,
Steven
Thank you very much: I just needed to retrieve the local commit id, so simply setting the origin url did the trick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 https://support.atlassian.com/ so we can investigate further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using the unmodified standard template for a maven project:
# This is a sample build configuration for Maven. # Check our guides at https://confluence.atlassian.com/x/VYk8Lw 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 pipelines: default: - step: script: # Modify the commands below to build your repository. - mvn clean install
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you be able to paste in the contents of your bitbucket-pipelines.yml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.