]> git.proxmox.com Git - ceph.git/blame - ceph/doc/install/clone-source.rst
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / doc / install / clone-source.rst
CommitLineData
7c673cae
FG
1=========================================
2 Cloning the Ceph Source Code Repository
3=========================================
4
5You may clone a Ceph branch of the Ceph source code by going to `github Ceph
6Repository`_, selecting a branch (``master`` by default), and clicking the
7**Download ZIP** button.
8
9.. _github Ceph Repository: https://github.com/ceph/ceph
10
11
12To clone the entire git repository, install and configure ``git``.
13
14
15Install Git
16===========
17
18To install ``git`` on Debian/Ubuntu, execute::
19
20 sudo apt-get install git
21
22
23To install ``git`` on CentOS/RHEL, execute::
24
25 sudo yum install git
26
27
28You must also have a ``github`` account. If you do not have a
29``github`` account, go to `github.com`_ and register.
30Follow the directions for setting up git at
31`Set Up Git`_.
32
11fdf7f2
TL
33.. _github.com: https://github.com
34.. _Set Up Git: https://help.github.com/linux-set-up-git
7c673cae
FG
35
36
37Add SSH Keys (Optional)
38=======================
39
40If 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.
42
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.
46
47To generate SSH keys for ``github``, execute::
48
49 ssh-keygen
50
51Get the key to add to your ``github`` account (the following example
52assumes you used the default file path)::
53
54 cat .ssh/id_rsa.pub
55
56Copy the public key.
57
58Go to your ``github`` account, click on "Account Settings" (i.e., the
59'tools' icon); then, click "SSH Keys" on the left side navbar.
60
61Click "Add SSH key" in the "SSH Keys" list, enter a name for the key, paste the
62key you generated, and press the "Add key" button.
63
64
65Clone the Source
66================
67
68To clone the Ceph source code repository, execute::
69
70 git clone --recursive https://github.com/ceph/ceph.git
71
72Once ``git clone`` executes, you should have a full copy of the Ceph
73repository.
74
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.
78
79::
80
81 cd ceph
82 git status
83
84If your submodules are out of date, run::
85
86 git submodule update --force --init --recursive
87
88Choose a Branch
89===============
90
91Once you clone the source code and submodules, your Ceph repository
92will be on the ``master`` branch by default, which is the unstable
93development branch. You may choose other branches too.
94
95- ``master``: The unstable development branch.
96- ``stable``: The bugfix branch.
97- ``next``: The release candidate branch.
98
99::
100
101 git checkout master