* problem pushing repository @ 2007-06-22 1:49 Adam Mercer 2007-06-22 2:00 ` Junio C Hamano 2007-06-22 7:20 ` Johannes Sixt 0 siblings, 2 replies; 15+ messages in thread From: Adam Mercer @ 2007-06-22 1:49 UTC (permalink / raw) To: git Hi I've just started using git to track a project I'm working on and I'm having a problem pushing my repository. [ram@skymoo glue]$ git push ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git bash: line 1: git-receive-pack: command not found fatal: The remote end hung up unexpectedly error: failed to push to 'ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git' [ram@skymoo glue]$ which git-receive-pack /Users/ram/opt/git/bin/git-receive-pack [ram@skymoo glue]$ git-receive-pack is in my $PATH so why can't it be found when trying to push? Cheers Adam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 1:49 problem pushing repository Adam Mercer @ 2007-06-22 2:00 ` Junio C Hamano 2007-06-22 2:24 ` Andrew Ruder 2007-06-22 13:23 ` Adam Mercer 2007-06-22 7:20 ` Johannes Sixt 1 sibling, 2 replies; 15+ messages in thread From: Junio C Hamano @ 2007-06-22 2:00 UTC (permalink / raw) To: Adam Mercer; +Cc: git "Adam Mercer" <ramercer@gmail.com> writes: > [ram@skymoo glue]$ git push > ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git > bash: line 1: git-receive-pack: command not found > fatal: The remote end hung up unexpectedly > error: failed to push to > 'ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git' > [ram@skymoo glue]$ which git-receive-pack > /Users/ram/opt/git/bin/git-receive-pack > [ram@skymoo glue]$ > > git-receive-pack is in my $PATH so why can't it be found when trying to push? Check your ssh and ssh server settings. Often the process invoked from non-interactive ssh connection (such as the attempt to invoke receive-pack) would not get the PATH you set up in ~/.login or ~/.bash_profile. $ ssh newberry.ihepa.ufl.edu sh -c 'echo $PATH' may be a good starting point to test this, and the first step to fix it would be $ man ssh $ man sshd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 2:00 ` Junio C Hamano @ 2007-06-22 2:24 ` Andrew Ruder 2007-06-22 7:21 ` Raimund Bauer 2007-06-22 13:36 ` Adam Mercer 2007-06-22 13:23 ` Adam Mercer 1 sibling, 2 replies; 15+ messages in thread From: Andrew Ruder @ 2007-06-22 2:24 UTC (permalink / raw) To: git On Thu, Jun 21, 2007 at 07:00:18PM -0700, Junio C Hamano wrote: > $ ssh newberry.ihepa.ufl.edu sh -c 'echo $PATH' > > may be a good starting point to test this, and the first step > to fix it would be > > $ man ssh > $ man sshd While I wholeheartedly agree with Junio here, you may also find remote.<name>.receivepack useful, see git-push(1) and git-config(1) for more information. - Andy -- Andrew Ruder <andy@aeruder.net> http://www.aeruder.net ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 2:24 ` Andrew Ruder @ 2007-06-22 7:21 ` Raimund Bauer 2007-06-22 11:26 ` Johannes Schindelin 2007-06-22 13:36 ` Adam Mercer 1 sibling, 1 reply; 15+ messages in thread From: Raimund Bauer @ 2007-06-22 7:21 UTC (permalink / raw) To: Andrew Ruder; +Cc: git On Thu, 2007-06-21 at 21:24 -0500, Andrew Ruder wrote: > On Thu, Jun 21, 2007 at 07:00:18PM -0700, Junio C Hamano wrote: > > $ ssh newberry.ihepa.ufl.edu sh -c 'echo $PATH' > > > > may be a good starting point to test this, and the first step > > to fix it would be > > > > $ man ssh > > $ man sshd > > While I wholeheartedly agree with Junio here, you may also find > > remote.<name>.receivepack Yes, but it doesn't always work. I have a server with several repositories, and git is installed in /usr/local/bin. All my local repostories know this server as a remote named 'slcom' and I have a 2 global options remote.slcom.uploadpack=/usr/local/bin/git-upload-pack remote.slcom.receivepack=/usr/local/bin/git-receive-pack Fetching, pulling and normal pushing works. Pushing a new branch to the remote doesn't work: $ git branch test $ git push slcom test:test error: dst refspec test does not match any existing ref on the remote and does not start with refs/. fatal: The remote end hung up unexpectedly error: failed to push to 'ray@softwarelandschaft.com:/home/ray/repos/drupal/multirate' git-remote also has a problem: $ git remote show slcom bash: git-upload-pack: command not found fatal: The remote end hung up unexpectedly ls-remote --heads ray@softwarelandschaft.com:/home/ray/repos/drupal/multirate: command returned error: 1 All this with git from yesterday (next). > - Andy -- best regards Ray ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 7:21 ` Raimund Bauer @ 2007-06-22 11:26 ` Johannes Schindelin 2007-06-22 13:38 ` Raimund Bauer 0 siblings, 1 reply; 15+ messages in thread From: Johannes Schindelin @ 2007-06-22 11:26 UTC (permalink / raw) To: Raimund Bauer; +Cc: Andrew Ruder, git Hi, On Fri, 22 Jun 2007, Raimund Bauer wrote: > $ git push slcom test:test > error: dst refspec test does not match any existing ref on the remote > and does not start with refs/. > fatal: The remote end hung up unexpectedly > error: failed to push to > 'ray@softwarelandschaft.com:/home/ray/repos/drupal/multirate' This is a completely unrelated problem! It says that there is no branch named "test" on the remote side, and since you could also want to push a tag, you have to say test:refs/heads/test here. However, I do not understand why you bother to use the :dst syntax here, since your target name is _exactly_ the same as the source name. Why not just git push slcom test Hm?? > git-remote also has a problem: > $ git remote show slcom > bash: git-upload-pack: command not found > fatal: The remote end hung up unexpectedly > ls-remote --heads > ray@softwarelandschaft.com:/home/ray/repos/drupal/multirate: command > returned error: 1 That's apparently a bug in git-remote. Ciao, Dscho ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 11:26 ` Johannes Schindelin @ 2007-06-22 13:38 ` Raimund Bauer 2007-06-22 22:47 ` Shawn O. Pearce 0 siblings, 1 reply; 15+ messages in thread From: Raimund Bauer @ 2007-06-22 13:38 UTC (permalink / raw) To: Johannes Schindelin; +Cc: Andrew Ruder, git Hi, On Fri, 2007-06-22 at 12:26 +0100, Johannes Schindelin wrote: > Hi, > > On Fri, 22 Jun 2007, Raimund Bauer wrote: > > > $ git push slcom test:test > > error: dst refspec test does not match any existing ref on the remote > > and does not start with refs/. > > fatal: The remote end hung up unexpectedly > > error: failed to push to > > 'ray@softwarelandschaft.com:/home/ray/repos/drupal/multirate' > > This is a completely unrelated problem! > > It says that there is no branch named "test" on the remote side, and since > you could also want to push a tag, you have to say > > test:refs/heads/test > > here. However, I do not understand why you bother to use the :dst syntax > here, since your target name is _exactly_ the same as the source name. Why > not just > > git push slcom test because I had gotten the command line from bash-completion and since it worked with existing branches I saw no reason why it shouldn't work with new ones. will read the documentation next time ;-) > Ciao, > Dscho -- best regards Ray ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 13:38 ` Raimund Bauer @ 2007-06-22 22:47 ` Shawn O. Pearce 2007-06-23 10:12 ` Raimund Bauer 0 siblings, 1 reply; 15+ messages in thread From: Shawn O. Pearce @ 2007-06-22 22:47 UTC (permalink / raw) To: Raimund Bauer; +Cc: Johannes Schindelin, Andrew Ruder, git Raimund Bauer <ray007@gmx.net> wrote: > On Fri, 2007-06-22 at 12:26 +0100, Johannes Schindelin wrote: > > On Fri, 22 Jun 2007, Raimund Bauer wrote: > > > > > $ git push slcom test:test > > > error: dst refspec test does not match any existing ref on the remote > > > and does not start with refs/. > > > > It says that there is no branch named "test" on the remote side, and since > > you could also want to push a tag, you have to say > > > > test:refs/heads/test > > > > here. However, I do not understand why you bother to use the :dst syntax > > here, since your target name is _exactly_ the same as the source name. Why > > not just > > > > git push slcom test > > because I had gotten the command line from bash-completion I just patched the bash completion package to offer `git push slcom test` as the completion, instead of `git push slcom test:test`. The patch was pretty trivial, and is now also in my fastimport.git tree on repo.or.cz. -->8-- Avoid src:dst syntax as default bash completion for git push Raimund Bauer just discovered that the default bash completion for a local branch name in a git-push line is not the best choice when the branch does not exist on the remote system. In the past we have always completed the local name 'test' as "test:test", indicating that the destination name is the same as the local name. But this fails when "test" does not yet exist on the remote system, as there is no "test" branch for it to match the name against. Fortunately git-push does the right thing when given just the local branch, as it assumes you want to use the same name in the destination repository. So we now offer "test" as the completion in a git-push line, and let git-push assume that is also the remote branch name. We also still support the remote branch completion after the :, but only if the user manually adds the colon before trying to get a completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 9e72f0f..c7c9963 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -683,7 +683,7 @@ _git_push () __gitcomp "$(__git_refs "$remote")" "" "${cur#*:}" ;; *) - __gitcomp "$(__git_refs2)" + __gitcomp "$(__git_refs)" ;; esac ;; -- 1.5.2.2.1050.g51a8b -- Shawn. ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 22:47 ` Shawn O. Pearce @ 2007-06-23 10:12 ` Raimund Bauer 2007-06-24 23:47 ` Shawn O. Pearce 0 siblings, 1 reply; 15+ messages in thread From: Raimund Bauer @ 2007-06-23 10:12 UTC (permalink / raw) To: Shawn O. Pearce; +Cc: Johannes Schindelin, Andrew Ruder, git Hi, On Fri, 2007-06-22 at 18:47 -0400, Shawn O. Pearce wrote: > Signed-off-by: Shawn O. Pearce <spearce@spearce.org> > --- > contrib/completion/git-completion.bash | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Thanks a lot, your patch makes my life easier. Since you obviously know what you're doing here, maybe I can wish for something too? It would be really cool if completion also worked when I started the branchname with a '+' to force the push ... -- best regards Ray ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-23 10:12 ` Raimund Bauer @ 2007-06-24 23:47 ` Shawn O. Pearce 2007-06-25 1:01 ` Jakub Narebski 0 siblings, 1 reply; 15+ messages in thread From: Shawn O. Pearce @ 2007-06-24 23:47 UTC (permalink / raw) To: Raimund Bauer; +Cc: Johannes Schindelin, Andrew Ruder, git Raimund Bauer <ray007@gmx.net> wrote: > On Fri, 2007-06-22 at 18:47 -0400, Shawn O. Pearce wrote: > > Signed-off-by: Shawn O. Pearce <spearce@spearce.org> > > --- > > contrib/completion/git-completion.bash | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > Thanks a lot, your patch makes my life easier. > Since you obviously know what you're doing here, maybe I can wish for > something too? Heh, sure. I wrote that "stock" bash completion package, but at this point I largely consider it to be "complete and stable" and therefore don't put a lot of effort into it anymore. This recent thread has been interesting, as it has uncovered two bugs related to the git-push completion. > It would be really cool if completion also worked when I started the > branchname with a '+' to force the push ... How does this work? ;-) I'm pushing it out to my fastimport tree shortly. -->8-- Teach bash how to complete +refspec on git-push Using `git push origin +foo` to forcefully overwrite the remote branch named foo is a common idiom, especially since + is shorter than the long option --force and can be specified on a per-branch basis. We now complete `git push origin +foo` just like we do the standard `git push origin foo`. The leading + on a branch refspec does not alter the completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- contrib/completion/git-completion.bash | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index c7c9963..f2b10fa 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -682,6 +682,9 @@ _git_push () esac __gitcomp "$(__git_refs "$remote")" "" "${cur#*:}" ;; + +*) + __gitcomp "$(__git_refs)" + "${cur#+}" + ;; *) __gitcomp "$(__git_refs)" ;; -- 1.5.2.2.1334.g1625 -- Shawn. ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-24 23:47 ` Shawn O. Pearce @ 2007-06-25 1:01 ` Jakub Narebski 0 siblings, 0 replies; 15+ messages in thread From: Jakub Narebski @ 2007-06-25 1:01 UTC (permalink / raw) To: git Shawn O. Pearce wrote: > Heh, sure. I wrote that "stock" bash completion package, but at > this point I largely consider it to be "complete and stable" and > therefore don't put a lot of effort into it anymore. One thing that annoys me greatly (and I think I use newest completion) is that sometimes _filename_ completion gets confused on the '.' separating basename and extension, and instead of completing extension it adds another dot to make range operator '..' and triec to complete branch name, even if basename is _not_ any branch name. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 2:24 ` Andrew Ruder 2007-06-22 7:21 ` Raimund Bauer @ 2007-06-22 13:36 ` Adam Mercer 2007-06-22 14:17 ` Raimund Bauer 1 sibling, 1 reply; 15+ messages in thread From: Adam Mercer @ 2007-06-22 13:36 UTC (permalink / raw) To: git On 21/06/07, Andrew Ruder <andy@aeruder.net> wrote: > On Thu, Jun 21, 2007 at 07:00:18PM -0700, Junio C Hamano wrote: > > $ ssh newberry.ihepa.ufl.edu sh -c 'echo $PATH' > > > > may be a good starting point to test this, and the first step > > to fix it would be > > > > $ man ssh > > $ man sshd > > While I wholeheartedly agree with Junio here, you may also find > > remote.<name>.receivepack > > useful, see git-push(1) and git-config(1) for more information. This seems like the best way to fix this issue, however it isn't clear from the man page what I need to put in my ~/.gitconfig. With the following in .gitconfig [remote] glue.receivepack = /home/ram/opt/git/bin/git-receive-pack I get the following error when trying to push [ram@skymoo glue]$ git push ssh://newberry.ihepa.ufl.edu/~/public_html/git/glue.git fatal: bad config file line 6 in /Users/ram/.gitconfig so this is clearly not the right entry. Can someone please give me a push in the right direction? Cheers Adam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 13:36 ` Adam Mercer @ 2007-06-22 14:17 ` Raimund Bauer 2007-06-22 14:32 ` Adam Mercer 0 siblings, 1 reply; 15+ messages in thread From: Raimund Bauer @ 2007-06-22 14:17 UTC (permalink / raw) To: Adam Mercer; +Cc: git On Fri, 2007-06-22 at 09:36 -0400, Adam Mercer wrote: > This seems like the best way to fix this issue, however it isn't clear > >from the man page what I need to put in my ~/.gitconfig. With the > following in .gitconfig > > [remote] > glue.receivepack = /home/ram/opt/git/bin/git-receive-pack In my config it looks like this: [remote "slcom"] uploadpack = /usr/local/bin/git-upload-pack receivepack = /usr/local/bin/git-receive-pack -- best regards Ray ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 14:17 ` Raimund Bauer @ 2007-06-22 14:32 ` Adam Mercer 0 siblings, 0 replies; 15+ messages in thread From: Adam Mercer @ 2007-06-22 14:32 UTC (permalink / raw) To: Raimund Bauer; +Cc: git On 22/06/07, Raimund Bauer <ray007@gmx.net> wrote: > In my config it looks like this: > > [remote "slcom"] > uploadpack = /usr/local/bin/git-upload-pack > receivepack = /usr/local/bin/git-receive-pack putting [remote "glue"] uploadpack = /home/ram/opt/git/bin/git-upload-pack receivepack = /home/ram/opt/git/bin/git-receive-pack in my .gitconfig I still get the error saying that git-receive-pack can't be found. If I specify the path on the git push command line using the --exec option then git-receive-pack is found, so it appears that my config file isn't being read. Cheers Adam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 2:00 ` Junio C Hamano 2007-06-22 2:24 ` Andrew Ruder @ 2007-06-22 13:23 ` Adam Mercer 1 sibling, 0 replies; 15+ messages in thread From: Adam Mercer @ 2007-06-22 13:23 UTC (permalink / raw) To: Junio C Hamano; +Cc: git On 21/06/07, Junio C Hamano <gitster@pobox.com> wrote: > "Adam Mercer" <ramercer@gmail.com> writes: > > > [ram@skymoo glue]$ git push > > ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git > > bash: line 1: git-receive-pack: command not found > > fatal: The remote end hung up unexpectedly > > error: failed to push to > > 'ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git' > > [ram@skymoo glue]$ which git-receive-pack > > /Users/ram/opt/git/bin/git-receive-pack > > [ram@skymoo glue]$ > > > > git-receive-pack is in my $PATH so why can't it be found when trying to push? > > Check your ssh and ssh server settings. Often the process > invoked from non-interactive ssh connection (such as the attempt > to invoke receive-pack) would not get the PATH you set up in ~/.login > or ~/.bash_profile. > > $ ssh newberry.ihepa.ufl.edu sh -c 'echo $PATH' > > may be a good starting point to test this, and the first step > to fix it would be > > $ man ssh > $ man sshd Thanks Junio thats the problem my path isn't being set correctly on newberry [ram@skymoo ram]$ ssh newberry sh -c 'echo $PATH' [ram@skymoo ram]$ ssh newberry [ram@newberry ram]$ which git-receive-pack ~/opt/git/bin/git-receive-pack [ram@newberry ram]$ Cheers Adam ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: problem pushing repository 2007-06-22 1:49 problem pushing repository Adam Mercer 2007-06-22 2:00 ` Junio C Hamano @ 2007-06-22 7:20 ` Johannes Sixt 1 sibling, 0 replies; 15+ messages in thread From: Johannes Sixt @ 2007-06-22 7:20 UTC (permalink / raw) To: git Adam Mercer wrote: > [ram@skymoo glue]$ git push > ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git > bash: line 1: git-receive-pack: command not found > fatal: The remote end hung up unexpectedly > error: failed to push to > 'ssh://ram@newberry.ihepa.ufl.edu/~ram/public_html/git/glue.git' > [ram@skymoo glue]$ which git-receive-pack > /Users/ram/opt/git/bin/git-receive-pack > [ram@skymoo glue]$ > > git-receive-pack is in my $PATH so why can't it be found when trying to push? You must have git installed on the remote end, too. -- Hannes ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-06-25 0:56 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-06-22 1:49 problem pushing repository Adam Mercer 2007-06-22 2:00 ` Junio C Hamano 2007-06-22 2:24 ` Andrew Ruder 2007-06-22 7:21 ` Raimund Bauer 2007-06-22 11:26 ` Johannes Schindelin 2007-06-22 13:38 ` Raimund Bauer 2007-06-22 22:47 ` Shawn O. Pearce 2007-06-23 10:12 ` Raimund Bauer 2007-06-24 23:47 ` Shawn O. Pearce 2007-06-25 1:01 ` Jakub Narebski 2007-06-22 13:36 ` Adam Mercer 2007-06-22 14:17 ` Raimund Bauer 2007-06-22 14:32 ` Adam Mercer 2007-06-22 13:23 ` Adam Mercer 2007-06-22 7:20 ` Johannes Sixt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).