Wednesday, August 14, 2013

git clone : "not a Gerrit project" OR "Could not read from remote repository" fatal error

First try to follow this document. If you are still  getting below error while you are cloning a git repo, it indicates that you or your group do not have permission (we are using gerrit to manage repository permission and code review) on repository.

$ git clone
ssh://UserName@MyGitServer.MyCompany.com:29418/MyGitRepo.git
Cloning into 'MyGitRepo'...
fatal: '/MyGitRepo.git': not a Gerrit project
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists
.

Surprisingly, below command shows that user is partof group that have rw permission.

$ id UserName|grep GroupNameOfUser
uid=512(UserName) gid=503(GroupNameOfUser)

BUT, query against  GroupNameOfUser on windows AD shows that it is not !

$ ldapsearch -h MyLDAPserver -p 389 -D 'CN=svc_UNIX_LDAP,OU=Standard Service Accounts,OU=Service Accounts,DC=MyCompany,DC=com' -w w82A4CCXq6A -x -b 'DC=MyCompany,DC=com' 'CN=GroupNameOfUser'


Solution : We were able to resolve it by removing user from group in AD and adding it again in the group. Run ldapsearch to crosscheck and did successful clone the repo. Is this page was useful for anyone ?

No comments:

Post a Comment