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<https://www.linkedin.com/company/piketec-gmbh>|Facebook<https://www.facebook.com/PikeTec>|Twitter<https://twitter.com/piketec>|Youtube<https://www.youtube.com/user/piketec>

Von: James Nord [mailto:[email protected]]
Gesendet: Dienstag, 13. Oktober 2015 11:00
An: Jenkins Developers
Cc: Joachim Kuhnert
Betreff: Re: Problems releasing plugin "[ERROR] ssh: Could not resolve hostname 
<username>: Name or service not known"

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 
[email protected]<mailto:[email protected]> 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)


On Tuesday, October 13, 2015 at 9:46:04 AM UTC+2, Joachim Kuhnert wrote:
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 [email protected]<javascript:>
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: 
[email protected]:jenkinsci/piketec-tpt-plugin.git<mailto:[email protected]:jenkinsci/piketec-tpt-plugin.git>
  Push  URL: 
[email protected]:jenkinsci/piketec-tpt-plugin.git<mailto:[email protected]: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<https://www.linkedin.com/company/piketec-gmbh>|Facebook<https://www.facebook.com/PikeTec>|Twitter<https://twitter.com/piketec>|Youtube<https://www.youtube.com/user/piketec>

-- 
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 [email protected].
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.

Reply via email to