Skip to content

Commit ec1f8f6

Browse files
committed
Merge pull request #3398 from mboersma/rearrange-buildpacks-doc
ref(docs): move "private repos" section after "custom buildpacks"
2 parents 2a59e60 + 2a28030 commit ec1f8f6

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

docs/using_deis/using-buildpacks.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,6 @@ Use ``deis create`` to create an application on the :ref:`controller`.
2727
Creating application... done, created unisex-huntress
2828
Git remote deis added
2929
30-
Optional: Add SSH KEY to use private repositories
31-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32-
33-
To pull code from private repositories, you'll need to provide Deis with a private SSH key which has access.
34-
35-
You can do so with deis client:
36-
37-
38-
Using private key file:
39-
40-
.. code-block:: console
41-
42-
$ deis config:set SSH_KEY=/home/user/.ssh/id_rsa
43-
44-
45-
You can also use a raw key instead of a private key file:
46-
47-
.. code-block:: console
48-
49-
$ deis config:set SSH_KEY="""-----BEGIN RSA PRIVATE KEY-----
50-
(...)
51-
-----END RSA PRIVATE KEY-----"""
52-
5330
Push to Deploy
5431
--------------
5532
Use ``git push deis master`` to deploy your application.
@@ -168,6 +145,28 @@ To use a custom buildpack, set the ``BUILDPACK_URL`` environment variable.
168145

169146
On your next ``git push``, the custom buildpack will be used.
170147

148+
Using Private Repositories
149+
--------------------------
150+
To pull code from private repositories, set the ``SSH_KEY`` environment variable to a private key
151+
which has access. Use either the path of a private key file or the raw key material:
152+
153+
.. code-block:: console
154+
155+
$ deis config:set SSH_KEY=/home/user/.ssh/id_rsa
156+
$ deis config:set SSH_KEY="""-----BEGIN RSA PRIVATE KEY-----
157+
(...)
158+
-----END RSA PRIVATE KEY-----"""
159+
160+
For example, to use a custom buildpack hosted at a private GitHub URL, ensure that an SSH public
161+
key exists in your `GitHub settings`_. Then set ``SSH_KEY`` to the corresponding SSH private key
162+
and set ``BUILDPACK_URL`` to the URL:
163+
164+
.. code-block:: console
165+
166+
$ deis config:set SSH_KEY=/home/user/.ssh/github_id_rsa
167+
$ deis config:set BUILDPACK_URL=git@github.com:user/private_buildpack.git
168+
$ git push deis master
169+
171170
172171
.. _`Ruby Buildpack`: https://github.com/heroku/heroku-buildpack-ruby
173172
.. _`Nodejs Buildpack`: https://github.com/heroku/heroku-buildpack-nodejs
@@ -182,3 +181,4 @@ On your next ``git push``, the custom buildpack will be used.
182181
.. _`Go Buildpack`: https://github.com/kr/heroku-buildpack-go
183182
.. _`Multi Buildpack`: https://github.com/heroku/heroku-buildpack-multi
184183
.. _`Heroku Buildpacks`: https://devcenter.heroku.com/articles/buildpacks
184+
.. _`GitHub settings`: https://github.com/settings/ssh

0 commit comments

Comments
 (0)