Problems releasing plugin "[ERROR] ssh: Could not resolve hostname <username>: Name or service not known"

2,835 views
Skip to first unread message

Joachim Kuhnert

unread,
Oct 13, 2015, 3:46:04 AM10/13/15
to jenkin...@googlegroups.com

Hello,

 

I tried to release the PikeTec-TPT-Plugin for hours but unfortunately I was not able to do so because pushing to git fails. I found a few similar problems in this google group and on other pages but it did not solve my Problem. I executed the commands from git-bash.

 

jkuhnert@C47 MINGW64 /c/home/tpt/jenkins-plugin/piketec-tpt-plugin (master)

$ mvn release:prepare release:perform -Dusername=PikeTec -Dpassword=<$DPassword$> -B

[…]

------

[INFO] [INFO] BUILD SUCCESS

[INFO] [INFO] ------------------------------------------------------------------

------

[INFO] [INFO] Total time: 01:43 min

[INFO] [INFO] Finished at: 2015-10-13T08:38:26+02:00

[INFO] [INFO] Final Memory: 52M/711M

[INFO] [INFO] ------------------------------------------------------------------

------

[INFO] Checking in modified POMs...

[INFO] Executing: cmd.exe /X /C "git add -- pom.xml"

[INFO] Working directory: C:\home\tpt\jenkins-plugin\piketec-tpt-plugin

[INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"

[INFO] Working directory: C:\home\tpt\jenkins-plugin\piketec-tpt-plugin

[INFO] Executing: cmd.exe /X /C "git status --porcelain ."

[INFO] Working directory: C:\home\tpt\jenkins-plugin\piketec-tpt-plugin

[WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup

[WARNING] Ignoring unrecognized line: ?? release.bat

[WARNING] Ignoring unrecognized line: ?? release.properties

[WARNING] Ignoring unrecognized line: ?? target/classes/

[WARNING] Ignoring unrecognized line: ?? target/inject-tests/

[WARNING] Ignoring unrecognized line: ?? target/jenkins-for-test/

[WARNING] Ignoring unrecognized line: ?? target/piketec-tpt.hpi

[WARNING] Ignoring unrecognized line: ?? target/piketec-tpt.jar

[WARNING] Ignoring unrecognized line: ?? target/piketec-tpt.one-jar.jar

[WARNING] Ignoring unrecognized line: ?? target/piketec-tpt/

[WARNING] Ignoring unrecognized line: ?? target/surefire-reports/

[WARNING] Ignoring unrecognized line: ?? target/test-classes/

[INFO] Executing: cmd.exe /X /C "git commit --verbose -F C:\Users\JKuhnert\AppDa

ta\Local\Temp\maven-scm-1998252864.commit pom.xml"

[INFO] Working directory: C:\home\tpt\jenkins-plugin\piketec-tpt-plugin

[INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD"

[INFO] Working directory: C:\home\tpt\jenkins-plugin\piketec-tpt-plugin

[INFO] Executing: cmd.exe /X /C "git push PikeTec:<$DPassword$>@github.com:jenkinsci/

piketec-tpt-plugin.git refs/heads/master:refs/heads/master"

[INFO] Working directory: C:\home\tpt\jenkins-plugin\piketec-tpt-plugin

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 01:48 min

[INFO] Finished at: 2015-10-13T08:38:28+02:00

[INFO] Final Memory: 16M/239M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5

:prepare (default-cli) on project piketec-tpt: Unable to commit files

[ERROR] Provider message:

[ERROR] The git-push command failed.

[ERROR] Command output:

[ERROR] ssh: Could not resolve hostname piketec: Name or service not known

[ERROR] fatal: Could not read from remote repository.

[ERROR]

[ERROR] Please make sure you have the correct access rights

[ERROR] and the repository exists.

[ERROR] -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please rea

d the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc

eption

 

Please note, that I replaced my Password by <$DPassword$> . I am a bit confused, why the git push is executed with user name and password when it should use  ssh. I started the ssh-agent and I can authenticate to github:

 

jkuhnert@C47 MINGW64 /c/home/tpt/jenkins-plugin/piketec-tpt-plugin (master)

$ ssh -T g...@github.com

Hi PikeTec! You've successfully authenticated, but GitHub does not provide shell access.

 

A bit  general information:

 

jkuhnert@C47 MINGW64 /c/home/tpt/jenkins-plugin/piketec-tpt-plugin (master)

$ mvn --version

Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)

Maven home: C:\Tools\maven

Java version: 1.8.0_20, vendor: Oracle Corporation

Java home: C:\Tools\Java\jdk1.8.0_20\jre

Default locale: de_DE, platform encoding: Cp1252

OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

 

 

jkuhnert@C47 MINGW64 /c/home/tpt/jenkins-plugin/piketec-tpt-plugin (master)

$ git remote show origin

* remote origin

  Fetch URL: g...@github.com:jenkinsci/piketec-tpt-plugin.git

  Push  URL: g...@github.com:jenkinsci/piketec-tpt-plugin.git

  HEAD branch: master

  Remote branch:

    master tracked

  Local branch configured for 'git pull':

    master rebases onto remote master

  Local ref configured for 'git push':

    master pushes to master (up to date)

 

 

However, when I omit Username and Password, everything works fine, except copying the hpi-File to http://maven.jenkins-ci.org:8081/content/repositories/releases of course. Password and Username are the same for GitHub and Jenkins-CI.

 

If anyone has an Idea I would be pleased to hear it.

 

Best regards

Joachim

 

 

---------------------------------------------------

Joachim Kuhnert

fon: +49 30 394 09 683 39

 

PikeTec GmbH, Waldenserstr 2-4, 10551 Berlin

Geschäftsführer: Eckard Bringmann, Andreas Krämer, Jens Lüdemann

Sitz der Gesellschaft: Berlin

Handelsregister: Amtsgericht Berlin HRB 105491 B

LinkedIn|Facebook|Twitter|Youtube

 

James Nord

unread,
Oct 13, 2015, 4:59:55 AM10/13/15
to Jenkins Developers, Joachim...@piketec.com
username password only works if your <developerConnection> in the pom.xml it http(s) (and possibly ssh - but IIRC only the username part makes a difference as the rest needs to be done with a private key).  For g...@github.com based URLs (which is what you have) you should not supply a username or password as the authentication is done purely based on the private SSH key.  (so no need for --username=bob --password=secret on the command line)

Joachim Kuhnert

unread,
Oct 13, 2015, 5:15:10 AM10/13/15
to jenkin...@googlegroups.com

Thank you for your answer. If I omit username and password the maven execution will run much longer and is nearly successful but will fail to copy the hpi-File to Jenkins-ci.org which seems reasonable to me.

 

[INFO] [INFO] --- maven-deploy-plugin:2.6:deploy (default-deploy) @ piketec-tpt ---

[INFO] [INFO] Uploading: http://maven.jenkins-ci.org:8081/content/repositories/releases/com/piketec/jenkins/plugins/piketec-tpt/6.1/piketec-tpt-6.1.hpi

[INFO] [INFO] Uploading: http://maven.jenkins-ci.org:8081/content/repositories/releases/com/piketec/jenkins/plugins/piketec-tpt/6.1/piketec-tpt-6.1.pom

[INFO] [INFO] ------------------------------------------------------------------------

[INFO] [INFO] BUILD FAILURE

[INFO] [INFO] ------------------------------------------------------------------------

[INFO] [INFO] Total time: 50.538 s

[INFO] [INFO] Finished at: 2015-10-13T09:31:00+02:00

[INFO] [INFO] Final Memory: 58M/574M

[INFO] [INFO] ------------------------------------------------------------------------

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy (default-deploy) on project piketec-tpt: Failed to deploy artifacts: Could not transfer artifact com.piketec.jenkins.plugins:piketec-tpt:hpi:6.1 from/to maven.jenkins-ci.org (http://maven.jenkins-ci.org:8081/content/repositories/releases): Failed to transfer file: http://maven.jenkins-ci.org:8081/content/repositories/releases/com/piketec/jenkins/plugins/piketec-tpt/6.1/piketec-tpt-6.1.hpi. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

[INFO] [ERROR]

[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.

[INFO] [ERROR]

[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:

[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 02:02 min

[INFO] Finished at: 2015-10-13T09:31:00+02:00

[INFO] Final Memory: 16M/253M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:perform (default-cli) on project piketec-tpt: Maven execution failed, exit code: '1' -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 

Best Regards,

Joachim

---------------------------------------------------

Joachim Kuhnert

fon: +49 30 394 09 683 39

 

PikeTec GmbH, Waldenserstr 2-4, 10551 Berlin

Geschäftsführer: Eckard Bringmann, Andreas Krämer, Jens Lüdemann

Sitz der Gesellschaft: Berlin

Handelsregister: Amtsgericht Berlin HRB 105491 B

LinkedIn|Facebook|Twitter|Youtube

 

Joachim Kuhnert

unread,
Oct 19, 2015, 2:34:43 AM10/19/15
to jenkin...@googlegroups.com

Hello everybody,

 

I am still unable to release our plugin. As described I can release to GitHub if I omit the password and user name parameters but copying to the Jenkins maven repository fails. If I declare Dusername and Dpassword mvn release will fail to push anything to GitHub because it tries to use password an username instead of ssh. I would be grateful if anybody can help. James Nord already indicated that I do not need to use password and username parameters but it is a bit frustrating that I do not get the last step working.

 

Best Regards

Joachim

 

---------------------------------------------------

Joachim Kuhnert

fon: +49 30 394 09 683 39

 

PikeTec GmbH, Waldenserstr 2-4, 10551 Berlin

Geschäftsführer: Eckard Bringmann, Andreas Krämer, Jens Lüdemann

Sitz der Gesellschaft: Berlin

Handelsregister: Amtsgericht Berlin HRB 105491 B

LinkedIn|Facebook|Twitter|Youtube

 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/601BB6FDC49648489C8BE0671860E03A107B34%40VS2.piketec.local.
For more options, visit
https://groups.google.com/d/optout.

domi

unread,
Oct 19, 2015, 3:09:04 AM10/19/15
to Jenkins Developers
Do you have the credentials for the maven repo defined in your settings.xml as described here? https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Releasingtojenkinsci.org
Domi

Joachim Kuhnert

unread,
Oct 19, 2015, 8:44:59 AM10/19/15
to jenkin...@googlegroups.com

Thank you very much, this solved the problem. It is a little bit embarrassing that I did forget about the settings.xml, because I did read the wiki page and it seems to be optional. But of course you need this entry if you omit the username and password parameter. So thank you again for answering me anyway.

 

Best Regards,

Joachim

 

---------------------------------------------------

Joachim Kuhnert

fon: +49 30 394 09 683 39

 

PikeTec GmbH, Waldenserstr. 2-4, 10551 Berlin

Management: Eckard Bringmann, Andreas Krämer, Jens Lüdemann

Location of the company: Berlin (Germany)

Trade register: Amtsgericht Berlin HRB 105491 B

Website: www.piketec.com

 

linkedin_35px   TPT_linkedin_35px   fb_35px   twitter_35px   

Reply all
Reply to author
Forward
0 new messages