gerrit: access gerrit repositories as root user by using public key of another user
We are using Active Directory for gerrit authentication and added our ssh-public keys to access git repos. If we use usernames same as AD users in linux boxes we are able to work well. But some of our work requires to use root user in linux boxes so we want to use root user completely to clone git repos and push changes to gerrit. But when we try to clone git repos from root user we are getting below error message git clone ssh://gerrit.doamin.com:29418/gitrepo.git Cloning into 'girepo... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists I have copied existing gerit user's ssh-key pair to /root/.ssh but still I am facing same issue. Is it possible to access git repos in gerrit as root by copying public keys of another gerrit user?
I got an answer from gerrit google groups community. Thanks to "David Ostrovsky" Adding an ssh alias in /root/.ssh/config and use it in clone command: Host gerrit HostName <gerrit server> User joe Port 29418
gerrit hooks - automatically push upstream for review
How to specify ID when use set-reviewers
Redirect loop when connecting to Gerrit
Customize gerrit home page:logo and color
Gerrit mistakenly deleted tables Any solution?
What's the role of Change-Id in commit message
Unpublish gerrit change
how to cherry pick a patch with all its dependencies?
Purge Abandoned Change-Ids from Gerrit for good
Gerrit behaviour to find change-id in last paragraph
Gerrit Code review tool
finding out Gerrit server version when having URL
Creating folders in gerrit base path?
How to get patchset “Author” out of Gerrit?
Gerrit code/peer review data extraction
Git clone failing for gerrit repository