gitmavengithubteamcityteamcity-8.0

Teamcity git push error - could not read username while using maven release perform


I'm new to Teamcity, I've configured the release build for one of the maven projects on teamcity (8.1.5) with vcs root set to GIT.

for VCS root I've configured git repo url and using password authentication during checkout. It checks out Git repo successfully but it fails to execute mvn release:prepare on it and throws error

The git-push command failed.
fatal: could not read Username for 'https://github.com': No such device or address

I know this error means no appropriate credentials helper configured on teamcity but why teamcity does not pick up the username/pwd configured in auth section by default.

Even I tried passing credentials using mvn arguments and pom has following scm settings

<scm>
    <connection>scm:git:https://github.com/abc/sp.git</connection>
    <developerConnection>scm:git:https://github.com/abc/sp.git</developerConnection>
    <url>scm:git:https://github.com/abc/sp.git</url> </scm>

vcs root auth setting maven configuration

how should I make it work for git push ? I could not find this in TC documents.


Solution

  • Along with all the above settings, I had to update my pom to add the latest of version of maven release plugin and it worked fine

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>                
    </plugin>