1765: Git should show the use ra Permission Denied error when using local repositories with invalid permissions

raymon*******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Oct. 12, 2010
What version are you running?
1.5RC1

What's the URL of the page containing the problem?

non public one

What steps will reproduce the problem?
1.http://<server>/admin/db/scmtools/repository/add/
2.Try to add Git repo, enter the '.git/' folder path into the Path field
3.Gives me the error "Unable to retrieve information from local Git repository"

Things I have tried/checked
* checked that git can be run as apache
* run the command git --git-dir=/path/to/local/.git config core.repositoryformatversion. As apache it returns no output, as root it returns '0'




What operating system are you using? What browser?


Please provide any additional information below.
chipx86
#1 chipx86
Check the permissions to make sure that *everything* on that repository can be accessed by your Apache user. If, as a normal user, I run:

    git --git-dir=/root/some/private/path config core.repositoryformatversion

And /root is not accessible by my user, I will receive no output. If I do have access, I see 0. So it sounds like a file permissions issue.
  • +NeedInfo
#2 raymon*******@gmai***** (Google Code) (Is this you? Claim this profile.)
You're absolutely right. Fixed. Sorry for the bother.
chipx86
#3 chipx86
Not a problem. Glad that was it! :)
  • -NeedInfo
    +SetupIssue
chipx86
#4 chipx86
Actually, let's go ahead and repurpose this.
  • -SetupIssue
    +Confirmed
  • +Component-SCMTools
    +BetterErrors
    +Milestone-Release1.5.x
  • +Git should show the use ra Permission Denied error when using local repositories with invalid permissions
david
#5 david
I don't actually see how it would be possible to give a better error. All we really know is that "git config" failed.
chipx86
#6 chipx86
Fixed on release-1.5.x (41eb674)
  • -Confirmed
    +Fixed
  • +chipx86
#7 stefano.*********@gmai***** (Google Code) (Is this you? Claim this profile.)
I am sorry but the solution to this is not really clear. I understand what is the issue, 
 git --git-dir=/root/some/private/path config core.repositoryformatversion is not giving 0  and for this reason i cant successfully complete the configuration of git.

But how to give access rights? 

I gave made
chown -R www-data:www:data /root/some/private/path

but still no success.
What should I do ?