Re: [gitorious] Re: Git Push Origin Master NOT WORKING
On Fri, Jan 21, 2011 at 8:43 PM, jamroks wrote: > Thanks for pointing me out in the rigth direction. I'm really glad to hear it worked out! Cheers, - Marius -- To post to this group, send email to gitorious@googlegroups.com To unsubscribe from this group, send email to gitorious+unsubscr...@googlegroups.com
[gitorious] Re: Git Push Origin Master NOT WORKING
I finally get what was going wrong. In fact you were right on one thing , because the error message indicate that there was a probleme with the gitorious command not being in the $PATH. but in fact my PATH environement variable was just well configured . i had a rigth probleme the user willing to push was not having the r-x rigth on the gitorious file script. Thanks for pointing me out in the rigth direction. And thanks to all people for always being there . réno On 21 jan, 17:19, jamroks wrote: > OK from what your telling me, i understand the whole process behind > the "push" to the repository. > > i try or advice ln -s $GITORIOUS_ROOT/script/gitorious /usr/bin/ > and it still didn't work i got the same first error message "gitorious > command not found" > > But still there is something strange there, because i look at the > file "authorized_key" in OS x it stays in "/Users/git/.ssh/ > authorized_keys" > > and there is a bunch of autorized_key corresponding to user i created > via the gitorious web interface : > > ** > *** > / > ### START KEY 1 ### > command="gitorious admin",no-port-forwarding,no-X11-forwarding,no- > agent-forwarding,no-pty ssh-rsa B3NzaCc .. == SshKey:1- > User:1 > > then there is > > ### START KEY 3 ### > command="gitorious vjreno",no-port-forwarding,no-X11-forwarding,no- > agent-forwarding,no-pty ssh-rsa > > ### START KEY 6 ### > command="gitorious jamroks",no-port-forwarding,no-X11-forwarding,no- > agent-forwarding,no-pty ssh-rsa > > ### START KEY 7 ### > command="gitorious jamroks",no-port-forwarding,no-X11-forwarding,no- > agent-forwarding,no-pty ssh-rsa (with different key) > > from there i open a terminal session with my current os x user "kemet" > change to "root" user an then switch to "git" user. As the "git" user > i just type in this following command : > > $ gitorious > > as a result i get a generated log file in : GITORIOUS_ROOT/log/ > gitorious_auth.log > > then i type in the following command : > > $ cat GITORIOUS_ROOT/log/gitorious_auth.log here is what you get : > > I, [2011-01-21 16:28:42#42538] INFO -- : Connection from nil (): > I, [2011-01-21 16:28:42#42538] INFO -- : Need SSH_ORIGINAL_COMMAND > > OK I don't really know if this is normale to get such a message a this > point : > > but a least it shows that when i'm connected in a terminal as the > "git" user issuing the command $ gitorious the command is well > recognized. and the command echo $PATH shows that too, > > $ echo $PATH : > > /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/ > git/bin:/opt/mysql/bin:/opt/imagemagick/bin:/opt/sphinx/bin:/appli/ > apache/thesource.myndsphere.me/gitorious/script > > my GITORIOUS_ROOT=/appli/apache/thesource.myndsphere.me/gitorious/ > > so it shouldn't be a problem. > > I know i'm surely missing something here but abviously it's not so > straight forward for me. > > here is what a do when trying to push. > > 1/ open a terminal with my os x user account "kemet" ( which has a > private/public key and the public key is uploaded to my gitorious > instance ) > 2/ still with the "kemet" user i issue the following command : git > add readme.txt , then git commit -m "first commit", then git remote > add origin g...@thesource.myndsphere.me:training/training.git > 3/ git push origin master > > then i get the error : > > bash: gitorious: command not found > fatal: The remote end hung up unexpectedl > > but when i repeat the same step to the remote gitorious.org repo > everything work like a charme . there is something broken in my ssh or > path environement variable but i can't seem to find out what exactly. > > On 21 jan, 14:00, Marius Mårnes Mathiesen > wrote: > > > > > > > > > On Fri, Jan 21, 2011 at 1:36 PM, jamroks wrote: > > > I did as you advice : ln -s $GITORIOUS_ROOT/script/gitorious /usr/ > > > local/bin/ but it didn't change, i still got the following error : > > > > meroe:localgit kemet$ git push origin master > > > bash: gitorious: command not found > > > fatal: The remote end hung up unexpectedly > > > It really seems like the gitorious script isn't available in $PATH at > > the time you're pushing. This is how it works: > > > - You push as the user `git` to the server, over SSH > > - When the `git` user connects, OpenSSH will scan > > ~git/.ssh/authorized_keys and try to find the public key associated > > with the private key you're using > > - Once this key is found, OpenSSH will either grant you shell access > > (which is not the case here) or try to run the command associated with > > your public key. This will probably look something like this: > > > ### START KEY X ### > > command="gitorious > > ",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty > > ssh-rsa B3N... > > > The command="..." part tells OpenSSH to execute the command gitorious > > with the
[gitorious] Re: Git Push Origin Master NOT WORKING
OK from what your telling me, i understand the whole process behind the "push" to the repository. i try or advice ln -s $GITORIOUS_ROOT/script/gitorious /usr/bin/ and it still didn't work i got the same first error message "gitorious command not found" But still there is something strange there, because i look at the file "authorized_key" in OS x it stays in "/Users/git/.ssh/ authorized_keys" and there is a bunch of autorized_key corresponding to user i created via the gitorious web interface : ** *** / ### START KEY 1 ### command="gitorious admin",no-port-forwarding,no-X11-forwarding,no- agent-forwarding,no-pty ssh-rsa B3NzaCc .. == SshKey:1- User:1 then there is ### START KEY 3 ### command="gitorious vjreno",no-port-forwarding,no-X11-forwarding,no- agent-forwarding,no-pty ssh-rsa ### START KEY 6 ### command="gitorious jamroks",no-port-forwarding,no-X11-forwarding,no- agent-forwarding,no-pty ssh-rsa ### START KEY 7 ### command="gitorious jamroks",no-port-forwarding,no-X11-forwarding,no- agent-forwarding,no-pty ssh-rsa (with different key) from there i open a terminal session with my current os x user "kemet" change to "root" user an then switch to "git" user. As the "git" user i just type in this following command : $ gitorious as a result i get a generated log file in : GITORIOUS_ROOT/log/ gitorious_auth.log then i type in the following command : $ cat GITORIOUS_ROOT/log/gitorious_auth.log here is what you get : I, [2011-01-21 16:28:42#42538] INFO -- : Connection from nil (): I, [2011-01-21 16:28:42#42538] INFO -- : Need SSH_ORIGINAL_COMMAND OK I don't really know if this is normale to get such a message a this point : but a least it shows that when i'm connected in a terminal as the "git" user issuing the command $ gitorious the command is well recognized. and the command echo $PATH shows that too, $ echo $PATH : /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/ git/bin:/opt/mysql/bin:/opt/imagemagick/bin:/opt/sphinx/bin:/appli/ apache/thesource.myndsphere.me/gitorious/script my GITORIOUS_ROOT=/appli/apache/thesource.myndsphere.me/gitorious/ so it shouldn't be a problem. I know i'm surely missing something here but abviously it's not so straight forward for me. here is what a do when trying to push. 1/ open a terminal with my os x user account "kemet" ( which has a private/public key and the public key is uploaded to my gitorious instance ) 2/ still with the "kemet" user i issue the following command : git add readme.txt , then git commit -m "first commit", then git remote add origin g...@thesource.myndsphere.me:training/training.git 3/ git push origin master then i get the error : bash: gitorious: command not found fatal: The remote end hung up unexpectedl but when i repeat the same step to the remote gitorious.org repo everything work like a charme . there is something broken in my ssh or path environement variable but i can't seem to find out what exactly. On 21 jan, 14:00, Marius Mårnes Mathiesen wrote: > On Fri, Jan 21, 2011 at 1:36 PM, jamroks wrote: > > I did as you advice : ln -s $GITORIOUS_ROOT/script/gitorious /usr/ > > local/bin/ but it didn't change, i still got the following error : > > > meroe:localgit kemet$ git push origin master > > bash: gitorious: command not found > > fatal: The remote end hung up unexpectedly > > It really seems like the gitorious script isn't available in $PATH at > the time you're pushing. This is how it works: > > - You push as the user `git` to the server, over SSH > - When the `git` user connects, OpenSSH will scan > ~git/.ssh/authorized_keys and try to find the public key associated > with the private key you're using > - Once this key is found, OpenSSH will either grant you shell access > (which is not the case here) or try to run the command associated with > your public key. This will probably look something like this: > > ### START KEY X ### > command="gitorious > ",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty > ssh-rsa B3N... > > The command="..." part tells OpenSSH to execute the command gitorious > with the username as the first parameter. From the output you pasted, > we know we have gotten this far, since SSH complains it can't find the > `gitorious` command. > > At this time, the environment that's being used is determined from a > lot of factors. Normally, some kind of profile specifications are used > (like /etc/profile.d/*.sh on the Linux variants I know of), but > OpenSSH may still limit this. It's been a while since I was on a Mac, > but could it be /usr/local/bin is not part of the standard $PATH on > these systems? /usr/bin will probably always be available, but I can > imagine people would start screaming if I were to advise you to > symlink this script there. > > Cheers, > - Marius -- To post to t
Re: [gitorious] Re: Git Push Origin Master NOT WORKING
On Fri, Jan 21, 2011 at 1:36 PM, jamroks wrote: > I did as you advice : ln -s $GITORIOUS_ROOT/script/gitorious /usr/ > local/bin/ but it didn't change, i still got the following error : > > meroe:localgit kemet$ git push origin master > bash: gitorious: command not found > fatal: The remote end hung up unexpectedly It really seems like the gitorious script isn't available in $PATH at the time you're pushing. This is how it works: - You push as the user `git` to the server, over SSH - When the `git` user connects, OpenSSH will scan ~git/.ssh/authorized_keys and try to find the public key associated with the private key you're using - Once this key is found, OpenSSH will either grant you shell access (which is not the case here) or try to run the command associated with your public key. This will probably look something like this: ### START KEY X ### command="gitorious ",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa B3N... The command="..." part tells OpenSSH to execute the command gitorious with the username as the first parameter. From the output you pasted, we know we have gotten this far, since SSH complains it can't find the `gitorious` command. At this time, the environment that's being used is determined from a lot of factors. Normally, some kind of profile specifications are used (like /etc/profile.d/*.sh on the Linux variants I know of), but OpenSSH may still limit this. It's been a while since I was on a Mac, but could it be /usr/local/bin is not part of the standard $PATH on these systems? /usr/bin will probably always be available, but I can imagine people would start screaming if I were to advise you to symlink this script there. Cheers, - Marius -- To post to this group, send email to gitorious@googlegroups.com To unsubscribe from this group, send email to gitorious+unsubscr...@googlegroups.com
[gitorious] Re: Git Push Origin Master NOT WORKING
First of all, Thanks Marius here is the situation : The gitorious application is runing under "git" user here is a resultat of the command " ps -ef | grep git " : / **/ meroe:localgit kemet$ ps -ef | grep git 100264 1 0 0:00.01 ?? 0:00.01 /bin/sh /appli/ apache/thesource.myndsphere.me/gitorious/launchd/stompserver.sh start 1002 350 1 0 0:00.01 ?? 0:00.01 sh /appli/apache/ thesource.myndsphere.me/gitorious/launchd/git-daemon.sh start 1002 41464 0 0:00.33 ?? 0:00.65 /usr/bin/ruby / Library/Ruby/Gems/1.8/gems/stompserver-0.9.9/bin/stompserver -- working_dir=/appli/apache/thesource.myndsphere.me/gitorious 1002 498 350 0 0:00.67 ?? 0:05.04 /usr/bin/ruby / appli/apache/thesource.myndsphere.me/gitorious/script/git-daemon 1002 1505 487 0 0:00.64 ?? 0:04.62 Passenger ApplicationSpawner: /appli/apache/thesource.myndsphere.me/ gitorious 1002 1514 1 0 0:00.28 ?? 0:00.65 Rails: /appli/ apache/thesource.myndsphere.me/ gitorious 501 2152 810 0 0:00.00 ttys0000:00.00 grep git / **/ Then here is what i got originaly in my $PATH environement variable for the user "git' which run the gitorious application: / **/ GIT_INSTALL=/usr/local/git MYSQL_INSTALL=/opt/mysql IMAGEMAGICK_INSTALL=/opt/imagemagick SPHINX_INSTALL=/opt/sphinx GITORIOUS_ROOT=/appli/apache/thesource.myndsphere.me/gitorious PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin: $GIT_INSTALL/bin:$MYSQL_INSTALL/bin:$IMAGEMAGICK_INSTALL/bin: $SPHINX_INSTALL/bin:$GITORIOUS_ROOT/script export GIT_INSTALL export MYSQL_INSTALL export IMAGEMAGICK_INSTALL export SPHINX_INSTALL export GITORIOUS_ROOT export PATH / **/ I did as you advice : ln -s $GITORIOUS_ROOT/script/gitorious /usr/ local/bin/ but it didn't change, i still got the following error : meroe:localgit kemet$ git push origin master bash: gitorious: command not found fatal: The remote end hung up unexpectedly when i'm doing the push i'm using my regular computer user "kemet" the same user i use to succesfully push to remote repository on gitorious.org. Any idea ? Thanks in advance On 21 jan, 11:22, Marius Mårnes Mathiesen wrote: > On Fri, Jan 21, 2011 at 10:05 AM, jamroks wrote: > > At the end when i enter "git push origin master" i get this error: > > > /**/ > > git push origin master > > bash: gitorious: command not found > > fatal: The remote end hung up unexpectedly > > /**/ > > The problem here is that Gitorious depends on the script named > `gitorious` to work. The ~/.ssh/authorized_keys file for the user > Gitorious runs as will call this program with the given user's login > name as first parameter when you push. > > You should make this file (which exists in > $GITORIOUS_ROOT/script/gitorious) available in $PATH for the user > Gitorious runs as (the one whose ~/.ssh/authorized_keys the public key > exists in). Symlinking it to eg. /usr/local/bin should work: > > $ ln -s $GITORIOUS_ROOT/script/gitorious /usr/local/bin/ # > $GITORIOUS_ROOT is the folder your Gitorious source code resides > > Cheers, > - Marius -- To post to this group, send email to gitorious@googlegroups.com To unsubscribe from this group, send email to gitorious+unsubscr...@googlegroups.com