dingjinsheng / git-osx-installer

Automatically exported from code.google.com/p/git-osx-installer
0 stars 0 forks source link

Aliased git commands not working. #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Try 'git status'
$ git status
(output...)

Create an alias for 'status'
$ git config alias.stat status

Try alias
$ git stat
fatal: cannot exec 'git-stat': Operation not permitted

OS X 10.5.8
git 1.7.0.6

Original issue reported on code.google.com by kate.war...@gtempaccount.com on 7 May 2010 at 2:48

GoogleCodeExporter commented 8 years ago
Downgrading to 1.6.6.2 resolved the issue.

Original comment by kate.war...@gtempaccount.com on 7 May 2010 at 2:49

GoogleCodeExporter commented 8 years ago
That is so weird... I use tons of aliases. Will look into it

Original comment by timchar...@gmail.com on 7 May 2010 at 3:38

GoogleCodeExporter commented 8 years ago
Using 1.7.0.6.  I just followed your instructions and cannot reproduce it :S

I just pushed out a build of 1.7.1.  Can you see if it happens with that 
version as well?

Thanks,

Tim

Original comment by timchar...@gmail.com on 7 May 2010 at 3:57

GoogleCodeExporter commented 8 years ago
I have the same problem using git 1.7.0.4-1 on Ubuntu 10.04

$ git config --get alias.st
status

$ git st
fatal: cannot exec 'git-st': Permission denied

Original comment by gmak...@gmail.com on 12 May 2010 at 11:55

GoogleCodeExporter commented 8 years ago
OK, I found what was causing this from the #git irc logs:
http://colabti.org/irclogger/irclogger_log/git?date=2010-02-19#l2095

Basically, I had /root/bin in my path and didn't have permissions for that 
directory.

Interestingly, this was not a problem with git 1.6.3, but it was with 1.7.0 and 
1.7.1.

Original comment by gmak...@gmail.com on 13 May 2010 at 1:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I don't have strace installed, so the check mentioned in the IRC logs doesn't 
work for me. I can do an 'ls -ld' though, so I wrote this quick 1-liner to find 
invalid items in my PATH.

$ echo $PATH |tr ':' '\n' |xargs ls -ld

One of my invalid items is actually an NFS mounted directory that I don't have 
permission to access because I have not authenticated via Kerberos to the 
corporate NFS server. Removing that one item from the PATH fixes the issue, and 
'git stat' (my alias for status) now works.

FYI, I'm on 1.7.1 now.

Original comment by kate.war...@gtempaccount.com on 13 Jul 2010 at 12:03

GoogleCodeExporter commented 8 years ago

Original comment by timchar...@gmail.com on 8 Dec 2010 at 7:25

GoogleCodeExporter commented 8 years ago
Glad that you got things working again

Original comment by timchar...@gmail.com on 8 Dec 2010 at 7:25

GoogleCodeExporter commented 8 years ago
Another workaround is to add the $GIT_HOME and relevant $PATH entry before 
adding any other one. Like this:

export GIT_HOME=/path/to/git
export PATH=$GIT_HOME/bin:$PATH
....
export OTHER_ENTRY
export PATH=$OTHER_ENTRY/bin:$PATH

Original comment by nabeelalimemon on 22 Jan 2012 at 7:09

GoogleCodeExporter commented 8 years ago
Thanks @nabeelalimemom, that trick helped me solve the issue.

Original comment by fellger...@gmail.com on 4 Sep 2013 at 6:39