Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with wagon-gitsite #10

Open
khmarbaise opened this issue Apr 23, 2011 · 7 comments
Open

Problem with wagon-gitsite #10

khmarbaise opened this issue Apr 23, 2011 · 7 comments

Comments

@khmarbaise
Copy link

Hi,
i'm trying your wagon-gitsite plugin in Maven...but at the moment i'm not sure if i'm doing something wrong or whatever...I've configured the plugin as described on the page, but get the following results:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MaUI Test Guide 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-site-plugin:3.0-beta-3:deploy (default-cli) @ maui ---
scm:git:ssh://github.com/khmarbaise/maui.git/maui - Session: Opened  
Uploading: . to scm:git:ssh://github.com/khmarbaise/maui.git/maui

[INFO] Executing: /bin/sh -c cd /home/kama/ws-git/maui/. && git ls-files
[INFO] Working directory: /home/kama/ws-git/maui/.
[INFO] Executing: /bin/sh -c cd /tmp/wagon-scm1009009371.checkout && git init
[INFO] Working directory: /tmp/wagon-scm1009009371.checkout
[INFO] Executing: /bin/sh -c cd /tmp/wagon-scm1009009371.checkout && git remote add origin ssh://[email protected]/khmarbaise/maui.git
[INFO] Working directory: /tmp/wagon-scm1009009371.checkout
[INFO] Executing: /bin/sh -c cd /tmp/wagon-scm1009009371.checkout && git pull origin refs/heads/gh-pages
[INFO] Working directory: /tmp/wagon-scm1009009371.checkout
 Transfer error: org.apache.maven.scm.ScmException: Unable to commit file. The git-pull command failed. Permission denied (publickey).
fatal: The remote end hung up unexpectedly

scm:git:ssh://github.com/khmarbaise/maui.git/maui - Session: Disconnecting  
scm:git:ssh://github.com/khmarbaise/maui.git/maui - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.569s
[INFO] Finished at: Sat Apr 23 13:17:53 CEST 2011
[INFO] Final Memory: 5M/92M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:deploy (default-cli) on project maui: Error uploading site: Error checking out: Unable to commit file. The git-pull command failed. Permission denied (publickey).
[ERROR] fatal: The remote end hung up unexpectedly
[ERROR] -> [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
kama@office:~/ws-git/maui$ git branch -a

The code of that project is available under https://github.com/khmarbaise/maui ...
I've tried with Maven 2.2.1 and Maven 3.0.3 ?

I'm a little bit confused, cause on that repository i can do changes and push the changes back to github without any problem...
May be you have an idea and can enlighten me a bit ...;-)

Kind regards
Karl Heinz

@khuxtable
Copy link
Owner

There are two things that tend to cause people trouble with this plugin and I hope to fix both of them in the future. 1) You have to set your username to "git" in your settings.xml for the profile you use, and 2) you have to have manually created the gh-pages branch on github's site already using the instructions at http://pages.github.com. There's no reason the plugin couldn't create the branch, but I haven't done it yet. I'm not sure about forcing the username.

Could one of those be the issue? See how I have it configured in https://github.com/khuxtable/tracking-robot, for probably the simplest case. (I'm only pushing documentation in Maven. The build is done via Eclipse's Arduino plugin.)

@khuxtable
Copy link
Owner

I should add that I'm still using Maven 2.2.1, but I think this should work in 3.0.3.

@khmarbaise
Copy link
Author

Hi Kathryn,
the hint with the user to be set to git in the settings.xml did the trick. I assumed i have to use my own user...which was wrong....
Cool...Great Thanks for your help...and it works with Maven 3.0.3 ...without a problem...but with a little issue that supplemental sub folder will be created...which i currently don't understand where this is defined...

I had the gh-pages branch before and simple created my site by doing the following:

mvn clean site
git checkout gh-pages
cp -r target/site/** .
git add .
git commit -a -v 
git push

May be i have to go a different way...

@khuxtable
Copy link
Owner

No, that should have worked, I think. I'll investigate.

@khmarbaise
Copy link
Author

So i have create a separate git repository from scratch to exclude some problems with my original repository or my git repository or my setup......but i get the same behavior in that repository (https://github.com/khmarbaise/wagon-site)...
Thanks for that cool plugin...
Kind regards
Karl Heinz

@jglick
Copy link

jglick commented Oct 9, 2012

Having the same problem in my own repo. gh-pages branch exists. But ssh://github.com/a/b.git cannot be used to pull origin refs/heads/gh-pages:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

(Reproducible outside Maven.) Changing the URL to [email protected]:a/b.git makes it work, but how to get the gitsite plugin to do this to begin with?

(I did have

<server>
  <id>github-project-site</id>
  <username>git</username>
</server>

in my ~/.m2/settings.xml as seems to be recommended.)

@oleg-nenashev
Copy link

Necropost: I've experienced the same issue (jenkinsci/winp#16).

To resolve it, I've added github-pages id to settings.xml. The deployment was successfull after the clean build.

    <server>
      <id>github-pages</id>
      <username>git</username>
    </server>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants