Reputation: 13603
I want to publish my display-console-output-plugin.
But I got an error message saying ssh: Could not resolve hostname lyenliang: Name or service not known
when executing mvn release:prepare release:perform -Dusername=lyenliang -Dpassword=myPassword
, where lyenliang
is my github account.
You can find more information about the above command here.
This error message comes from cmd.exe /X /C "git push lyenliang:********@github.com:jenkinsci/display-console-output-plugin.git refs/heads/master:refs/heads/master"
.
I don't understand why I still get this error I have successfully requested upload permission.
Why does it say that my github account is not a valid name?
You can visit here for more error messages.
Here's the settings.xml I have:
<settings>
<pluginGroups>
<pluginGroup>org.jenkins-ci.tools</pluginGroup>
</pluginGroups>
<profiles>
<!-- Give access to Jenkins plugins -->
<profile>
<id>jenkins</id>
<activation>
<activeByDefault>true</activeByDefault> <!-- change this to false, if you don't like to have it on per default -->
</activation>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<mirrors>
<mirror>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
<mirrorOf>m.g.o-public</mirrorOf>
</mirror>
</mirrors>
</settings>
Upvotes: 1
Views: 198
Reputation: 13603
I solved this problem by putting my github username and password into settings.xml
(See here for how to put them into this file), then executing mvn release:prepare release:perform
.
The git push
command inside this method then becomes cmd.exe /X /C "git push [email protected]:jenkinsci/display-console-output-plugin.git refs/heads/master:refs/heads/master"
. It executed with no errors.
However, I still don't know why putting my github account and password in the command line doesn't work. I use the same account and password for both github and jenkins-ci.org.
Upvotes: 2