Question

I'm facing a pretty strange problem. I want to use the Maven Release-plugin (2.0) to release a project. Additionally I'm using GIT on a Stash-Server. The relevant part of the pom looks like this:

 25 <scm>
 26         <connection>scm:git:https://host-url.com/path/to/repository.git</connection>
 27         <developerConnection>scm:git:https://host-url.com/path/to/repository.git</developerConnection>
 28         <url>https://host-url.com/path/to/repository.git</url>
 29 </scm>

Now the release-plugin produces the following error:

19-Nov-2013 17:03:33    [ERROR] error: Couldn't resolve host 'host-url.compath' while accessing http://host-url.com/path/to/repository.git/info/refs?service=git-receive-pack

As you may notice, it only kills the part between the first two slashes. So I tried adding multiple extra-slashes, but it happens to always take the first non-empty string between to slashes and concatenate it to the url. I seriously have no idea what causes this behaviour and I've now spent several hours fiddling around with the URL. Any suggestions?

Edit: Same error with release-plugin 2.3.2 and Maven 3.1.

20-Nov-2013 09:06:05    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project project-name: Unable to commit files
20-Nov-2013 09:06:05    [ERROR] Provider message:
20-Nov-2013 09:06:05    [ERROR] The git-push command failed.
20-Nov-2013 09:06:05    [ERROR] Command output:
20-Nov-2013 09:06:05    [ERROR] error: Couldn't resolve host 'host-url.compath' while accessing http://host-url.com///////////path/to/repository.git/info/refs?service=git-receive-pack
Was it helpful?

Solution

It seems like the error had something to do with wrong user permissions in stash. I fixed the permissions for the repository and it worked fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top