Unable to add user with Gitolite
I'm new to gitolite. I am installing gitolite on a remote server.
So, I could git-cloning gitolite-admin.git.
git clone ssh://email@example.com/gitolite-admin.git
I wanted to add user and repo using gitolit. The next is the usual process for adding users.
In the local repository, conf / keydir exists.
added below the text.
repo aproject RW+ = testid
and, in local-mac,
ssh-keygen -t rsa.
added the public key to keydir / testid.pub
and then git add / git commit / git push works well.
okay then I tried to clone the new git repository from the remote server.
git clone ssh://firstname.lastname@example.org/aproject.git
but it makes a mistake like this ...
mac$ git clone ssh://email@example.com/aproject.git Cloning into 'aproject'... firstname.lastname@example.org password: Permission denied, please try again. email@example.com password: Permission denied, please try again. firstname.lastname@example.org password: Permission denied (publickey,gssapi-with-mic,password). fatal: The remote end hung up unexpectedly
I think git clone shoud doesn't ask for password. and the correct password also failed git-cloning.
My remote server is CentOS.
and comments are welcome.
source to share
all your ssh messages done with the account used for the installation
In your case:
However, you can specify a different public key to specify
for authentication with a different user.
The ssh session will still run as
But the name passed to the
script will be
(since the public key was registered
So use the file
where you give the correct parameter:
Host gitolitesrv Hostname dev.remoteserver.com User gitolite IdentityFile /path/to/tesitd
Note that this
must contain your private key
and your public key
At this stage, their name is irrelevant (can be
was important public key name is stored in
(since the file name is used for the identifier recorded in
a forced command )
And then this one
git clone gitolitesrv:aproject.git
OP Jinbom Heo mentions difficulties:
Cloning into an "object" ... R access for a DENIED object to gitolite
(Or there could be no repository along the given path. Did you name it correctly?) Fatal: the remote end hung up unexpectedly
it seems that the git user is not
Host dev2git Hostname dev.remoteserver.com User gitolite IdentityFile ~/.ssh/testid
And the file
includes the following (git-pushed):
repo aproject RW + = testid
Finally, I found the reason.
When generating ssh key using ssh-keygen, I typed in a password . This is problem.
So I tried keygen without password and it works ~. I don't know why the password should not be added when I make the key. Anyway, it works well
I can confirm that I always use keys without a passphrase .
I want to protect your key passphrase, see ". Annex 1: ssh daemon prompts for a password "
make sure you are prompted for a password and not a passphrase.
Do not be confused or mistaken in the prompt "Enter a passphrase for the key"
": to request a password from a remote server!
When you create
, you have the option to protect it with a passphrase.
When you subsequently use this
to access a remote host, the local client
needs to unlock the corresponding private key, and
possibly ask for a passphrase when you created
You have two options to avoid this prompt every time you try to use the private key.
- The first is to generate key pairs without a passphrase (just hit enter when prompted for one).
Don't forget to add the passphrase later, once everything is working using
- The second is using
, which in turn uses
) or something similar to manage your keys.
In addition to discussing another potential issue with
(see Appendix 3: The ssh client may not offer the correct key ), further discussion
is outside the scope of this document.
source to share
I was having problems cloning the repository
after the initial setup and it was because I gave the group write permissions to the gitolite user's home folder
didn't like that.
I checked Check
and saw this:
Authentication denied: poor ownership or modes for directory / home / git
So, all I needed to do was:
sudo chmod g-w /home/git/
source to share