OR if you use an IDE (NetBeans, Eclipse, etc.): (Note: If you connect without using this alias, your default ssh key will be used and you will receive permission errors.) Without this alias, you'd have to do something like >git clone and find out the ssh switch for specifying the private key to use – not pretty. Now, executing commands like >git clone gitbox:reponame.git, or >git push gitbox:reponame.git ensures you’re using the git user and appropriate private key. If you're connecting to the gitbox using terminal, edit/create the ~/.ssh/config file to include an alias that preconfigures your connection to the gitbox. Step 3) Ensure your connections to the gitbox use the git user and new private key Your gitbox is now ready to accept new connections from those authenticating as the git user, using the john_git_rsa private key. The push triggers the gitbox to register any new keys in the keydir/ folder with the authorized users list of the gitbox's git user. Briefly, the steps are: (1) clone the gitolite-admin repository (2) add the new public key to the gitolite-admin/keydir/ directory and (3) push the changes back to the gitolite-admin repository. You can find out how to use git to administer gitolite-admin with a quick search of Google. Step 2) Register new public key on gitbox You'll need to copy the public key to the gitbox in the next step. The output will be a set of private ( john_git_rsa) and public ( john_git_rsa.pub) keys (aka the keypair). Alternatively, if have access to a Linux machine you can generate your own using: ssh-keygen -t rsa -f john_git_rsa Most IDEs have the ability to create a new public/private keypair. You can overcome this error by (1) generating a new key pair, (2) registering the public key on the gitbox, and (3) by ensuring that when you connect to the gitbox, that you always connect as the git user using your new private key.įor the ninja, that’s probably enough. The git user is the user that gitolite runs as on the gitbox. ![]() ![]() To master -> master (hook declined)Įrror: failed to push some refs to don't know what I must do.īefore you start: The gitbox is the remote machine with git and gitolite installed. ![]() Remote: error: hook declined to update refs/heads/master Remote: BEGIN failed-compilation aborted at hooks/update line 7. Remote: Can't locate Gitolite/Hooks/Update.pm in contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl. Remote: Use of uninitialized value in require at hooks/update line 7. Remote: Empty compile time value given to use lib at hooks/update line 6 I just installed gitolite but when I push on the repository gitolite-admin I get an error: git push
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |