1 =========================================
2 Cloning the Ceph Source Code Repository
3 =========================================
5 You may clone a Ceph branch of the Ceph source code by going to `github Ceph
6 Repository`_, selecting a branch (``master`` by default), and clicking the
7 **Download ZIP** button.
9 .. _github Ceph Repository: https://github.com/ceph/ceph
12 To clone the entire git repository, install and configure ``git``.
18 To install ``git`` on Debian/Ubuntu, execute::
20 sudo apt-get install git
23 To install ``git`` on CentOS/RHEL, execute::
28 You must also have a ``github`` account. If you do not have a
29 ``github`` account, go to `github.com`_ and register.
30 Follow the directions for setting up git at
33 .. _github.com: http://github.com
34 .. _Set Up Git: http://help.github.com/linux-set-up-git
37 Add SSH Keys (Optional)
38 =======================
40 If you intend to commit code to Ceph or to clone using SSH
41 (``git@github.com:ceph/ceph.git``), you must generate SSH keys for github.
43 .. tip:: If you only intend to clone the repository, you may
44 use ``git clone --recursive https://github.com/ceph/ceph.git``
45 without generating SSH keys.
47 To generate SSH keys for ``github``, execute::
51 Get the key to add to your ``github`` account (the following example
52 assumes you used the default file path)::
58 Go to your ``github`` account, click on "Account Settings" (i.e., the
59 'tools' icon); then, click "SSH Keys" on the left side navbar.
61 Click "Add SSH key" in the "SSH Keys" list, enter a name for the key, paste the
62 key you generated, and press the "Add key" button.
68 To clone the Ceph source code repository, execute::
70 git clone --recursive https://github.com/ceph/ceph.git
72 Once ``git clone`` executes, you should have a full copy of the Ceph
75 .. tip:: Make sure you maintain the latest copies of the submodules
76 included in the repository. Running ``git status`` will tell you if
77 the submodules are out of date.
84 If your submodules are out of date, run::
86 git submodule update --force --init --recursive
91 Once you clone the source code and submodules, your Ceph repository
92 will be on the ``master`` branch by default, which is the unstable
93 development branch. You may choose other branches too.
95 - ``master``: The unstable development branch.
96 - ``stable``: The bugfix branch.
97 - ``next``: The release candidate branch.