User Tools

Site Tools


userdoc:gitolite

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userdoc:gitolite [2014-06-12 18:14]
korgadmin [Setting up your access]
userdoc:gitolite [2020-05-08 14:00] (current)
mricon
Line 1: Line 1:
 +~~REDIRECT>​https://​korg.docs.kernel.org/​gitolite/​index.html~~
 +
 ====== How to use gitolite ====== ====== How to use gitolite ======
  
Line 4: Line 6:
 IN PARTICULAR, do not upload non-Open Source cryptographic software, or cryptographic binaries from source not available on the Internet, under any circumstances. This is absolutely essential. IN PARTICULAR, do not upload non-Open Source cryptographic software, or cryptographic binaries from source not available on the Internet, under any circumstances. This is absolutely essential.
  
-===== Setting ​up your access ​===== +If you have not yet set up your ssh access, ​first see [[userdoc:ssh_access]].
- +
-You should have received a tarball containing the SSH private key to use for accessing your kernel.org account. Place that private key into your ''​~/​.ssh''​ directorye.g.: +
- +
-  cp korg-username ~/.ssh/​id_rsa_korg +
-   +
-Add the following entry into your .ssh/​config:​ +
- +
-  Host gitolite.kernel.org +
-    User git +
-    IdentityFile ~/​.ssh/​id_rsa_korg +
-    IdentitiesOnly yes+
  
-You can change this passphrase using ''​ssh-keygen -p''​. ALWAYS KEEP YOUR SSH KEY PROTECTED WITH A PASSPHRASE! 
 ===== Crash course on using gitolite ===== ===== Crash course on using gitolite =====
  
Line 38: Line 28:
 When cloning a tree that already exists on kernel.org, you will use the gitolite built in cloning system: When cloning a tree that already exists on kernel.org, you will use the gitolite built in cloning system:
  
-    ​ssh git@gitolite.kernel.org fork pub/​scm/​from-repo pub/​scm/​to-repo+  ​ssh git@gitolite.kernel.org fork pub/​scm/​from-repo pub/​scm/​to-repo
  
 This will take care of the git clone, and uses Shared (-s), and Linked (-l) git options. This will take care of the git clone, and uses Shared (-s), and Linked (-l) git options.
Line 70: Line 60:
   ssh git@gitolite.kernel.org desc pub/​scm/​linux/​kernel/​git/​[username]/​linux "​[username] kernel tree"   ssh git@gitolite.kernel.org desc pub/​scm/​linux/​kernel/​git/​[username]/​linux "​[username] kernel tree"
   ​   ​
-Note that the **desc** command does not like special characters such as quotes, ampersands, brackets, etc.+:!: Note that the **desc** command does not like special characters such as quotes, ampersands, brackets, etc. Another way to set your repository description is via a cgitrc file in the special %%__meta__%% branch of the repo. See [[userdoc:​cgit-meta-data|Repo appearance on git.kernel.org]] for more details.
  
 === fork === === fork ===
Line 86: Line 76:
 Sets up a random password you can use to authenticate against mail.kernel.org in order to send outgoing mail. The command output will also give you some configuration examples for mutt and git. Sets up a random password you can use to authenticate against mail.kernel.org in order to send outgoing mail. The command output will also give you some configuration examples for mutt and git.
  
 +=== mailforward ===
 +Allows you to modify your mail forwarding address. See [[userdoc:​mail]] for more details.
 +
 +=== 2fa ===
 +Allows you to set up your 2-factor authentication token. See [[userdoc:​gitolite_2fa]] for more details.
 +
 +=== track ===
 +Allows you to set up a remote to another repository hosted at kernel.org, which is useful when you want to avoid sending a lot of objects during "''​git push''"​. See [[userdoc:​gitolite_track_set]] for more details.
 +
 +===== Using the master instead of public mirrors =====
 +
 +The public mirrors, while generally trusted, don't offer the same level of protection as the gitolite master, so it is advisable to make sure that you use the gitolite.kernel.org master to apply pull requests. There is a simple way to instruct git to automatically use the master whenever a git.kernel.org pull URL is provided. ​
 +
 +Just add the following to your ''​~/​.gitconfig'':​
 +
 +<​code>​
 +[url "​ssh://​git@gitolite.kernel.org"​]
 +    insteadOf = https://​git.kernel.org
 +    insteadOf = http://​git.kernel.org
 +    insteadOf = git://​git.kernel.org
 +</​code>​
 +
 +Git will now automatically rewrite all git.kernel.org requests to be going to the master instead.
  
userdoc/gitolite.1402596883.txt.gz · Last modified: 2014-06-12 18:14 by korgadmin