summaryrefslogtreecommitdiff
path: root/doc/administration
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2017-04-06 12:47:40 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-04-06 12:47:40 +0000
commitfca0097c0f457c6d4d8e326e679ff7848264f021 (patch)
treea0397b05eb584f34f846e5299897eef4938283f8 /doc/administration
parentd062af91ca10bb0c48136ad9b9204b02d41fdf8c (diff)
downloadgitlab-ce-fca0097c0f457c6d4d8e326e679ff7848264f021.tar.gz
Github import rake task
Diffstat (limited to 'doc/administration')
-rw-r--r--doc/administration/raketasks/github_import.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/administration/raketasks/github_import.md b/doc/administration/raketasks/github_import.md
new file mode 100644
index 00000000000..affb4d17861
--- /dev/null
+++ b/doc/administration/raketasks/github_import.md
@@ -0,0 +1,36 @@
+# GitHub import
+
+>**Note:**
+>
+> - [Introduced][ce-10308] in GitLab 9.1.
+> - You need a personal access token in order to retrieve and import GitHub
+> projects. You can get it from: https://github.com/settings/tokens
+> - You also need to pass an username as the second argument to the rake task
+> which will become the owner of the project.
+
+To import a project from the list of your GitHub projects available:
+
+```bash
+# Omnibus installations
+sudo gitlab-rake import:github[access_token,root,foo/bar]
+
+# Installations from source
+bundle exec rake import:github[access_token,root,foo/bar] RAILS_ENV=production
+```
+
+In this case, `access_token` is your GitHub personal access token, `root`
+is your GitLab username, and `foo/bar` is the new GitLab namespace/project that
+will get created from your GitHub project. Subgroups are also possible: `foo/foo/bar`.
+
+
+To import a specific GitHub project (named `foo/github_repo` here):
+
+```bash
+# Omnibus installations
+sudo gitlab-rake import:github[access_token,root,foo/bar,foo/github_repo]
+
+# Installations from source
+bundle exec rake import:github[access_token,root,foo/bar,foo/github_repo] RAILS_ENV=production
+```
+
+[ce-10308]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10308