git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: aliases causing “Permission denied” error in git v1.7

From
Jeff King <peff@peff.net>
Date
Nov 4, 2011, 20:34 UTC
Message-ID
<20111104203415.GB26591@sigill.intra.peff.net>
In-Reply-To
<CALUFZ3n9cpHw3r3rcGriDqvJ+UM83L3Q19m=0YeAy51LBJzosA@mail.gmail.com>
On Fri, Nov 04, 2011 at 12:09:07PM +0400, Алексей Данченков wrote:
> $ git co -b newbranch
> $ git co oldbranch
> 
> results in "fatal: cannot exec 'git-co': Permission denied" error.

Git will try commands in your PATH before aliases. So you are running into a permissions problem with a "git-co" in your PATH.

Or more likely, there is an inaccessible directory of your PATH (and we get the same error code from execve whether it is the directory or the file itself which lacks permission). Try "git foobar" and I suspect you will see the same thing (it doesn't matter that you have no foobar alias; we never get past the "try to exec it" stage).

If you are on Linux, try:
  strace -f -e execve git foobar

to see the the problematic entry that is returning EACCES. Or look through your $PATH manually.

-Peff
Previous: Алексей ДанченковNext: Алексей Данченков
Message 2 of 3 in “aliases causing “Permission denied” error in git v1.7”
  1. Алексей ДанченковNov 4, 2011
  2. Jeff KingNov 4, 2011
  3. Алексей ДанченковNov 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.