Our situation:
We are running bamboo 5.14.3.1 on a windows machine.
We have a relatively simple build that checks out a project from github, then runs a maven build. This maven build uses a plugin (https://github.com/ktoso/maven-git-commit-id-plugin) which in turn will look up the remote url to the github repository.
This gave us an interesting error:
java.net.URISyntaxException: Illegal character in authority at index 7: file://E:\applications\bamboo-hom...
After much digging, it turns out that this is due to bambo generating an illegal URI for the remote url when running on a windows machine. Here, output from a couple of commands in the bamboo build dir:
E:\applications\bamboo-home\xml-data\build-dir\131073\ADV-PIP1-JOB1>git config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=file://E:\applications\bamboo-home\xml-data\build-dir\_git-repositories-cache\b76c4fd1f44e4014ae59e61ab8372dbbe881f259
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.develop.remote=origin
branch.develop.merge=refs/heads/develop
E:\applications\bamboo-home\xml-data\build-dir\131073\ADV-PIP1-JOB1>git ls-remote --get-url
file://E:\applications\bamboo-home\xml-data\build-dir\_git-repositories-cache\b76c4fd1f44e4014ae59e61ab8372dbbe881f259
As is obvious, the file "uri" is invalid.
https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/ tells us that the correct remote.origin.url property would start with
file:///E:/applications/...
(note the extra forward slash before E and the switch from backslash to forward slash throughout)
Are you already aware of this issue at Atlassian?
We have, until this is fixed, been forced to add a step to our build process that runs this command after checkout:
git remote set-url origin ${bamboo.repository.git.repositoryUrl}
This sets the url to a valid value.
edit: formatting
We have the same error here using Bamboo 6.2.2.
Is there any plan to fix this?
Thanks a lot @Thomas Arp for the trick. I hope Atlassian will fix this soon.
Kind regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.