Re: Fwd: Strange remote interaction
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 5, 2013, 05:21 UTC
- Message-ID
- <7v1ubuwhec.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CALZVapnDyF7m=R7xrjUJUtyr9xVUeDnL4tQSCoM2ze8GSuUUyg@mail.gmail.com>
Javier Domingo <javierdo1@gmail.com> writes:
Show 16 quoted lines
> I have just had the attached bash session, and I have no idea on what > is going on. > > Any help appreciated, > > Javier Domingo > > javier@frodo:~/proyectos/pfc$ git push -vvv javier master > Pushing to git@server:javier/pfc > To git@server:javier/pfc > ! [rejected] master -> master (non-fast-forward) > error: failed to push some refs to 'git@server:javier/pfc' > hint: Updates were rejected because a pushed branch tip is behind its remote > hint: counterpart. Check out this branch and merge the remote changes > hint: (e.g. 'git pull') before pushing again. > hint: See the 'Note about fast-forwards' in 'git push --help' for details.
So push is going to git@server:javier/pfc repository, while ...
> javier@frodo:~/proyectos/pfc$ git fetch -vvv javier > From server:javier/pfc > = [up to date] master -> javier/master
... fetch/pull goes to server:javier/pfc repository. Are they the same?
In a usual set-up, an access to git@server:javier/pfc will first locate the home directory for the user "git" (the token before "@"), and then its subdirectory javier/pfc, e.g. /home/git/javier/pfc, while an access to server:javier/pfc will first locate the home directory of whatever username the ssh connection uses by default (typically the local user but ~/.ssh/config may have "User" directive for the server) and then its subdirectory javier/pfc, e.g. /home/javier/javier/pfc. These two may be different locations.
Do these two commands show the same output?
$ git ls-remote git@server:javier/pfc refs/heads/master
$ git ls-remote server:javier/pfc refs/heads/masterIf the above conjecture is correct, I suspect they don't.