Commit ad5f9c1f authored by Jonathan Morgan Wheeler's avatar Jonathan Morgan Wheeler
Browse files

Added instructions for importing from GitHub

parent 202ec09e
......@@ -10,7 +10,7 @@
- [What is a GitLab group?](#GitLab-group)
- [Is GitLab intergated with Stanford workgroup?](#workgroup)
- [I accidently deleted my repostiory, how do I restore it?](#restore-repo)
- [How do I migrate github project to GitLab?] **Help Wanted!**
- [How do I migrate github project to GitLab?](#migrate)
## <a name="422-error" ></a> Why do I get "422 Error" when sign-in?
......@@ -74,3 +74,11 @@ $ mkdir ~/mygit-bundle
$ cd ~/mygit-bundle && tar xvf <path-to-bundle-file>
$ git clone ~/mygit-bundle <path-to-new-repo>
```
## <a name="migrate"></a>How do I migrate github project to GitLab?
Navigate to [https://code.stanford.edu/projects/new](https://code.stanford.edu/projects/new). At the top of the form, you will have the option to make either a blank project, to create a project from a template, or to import a project. Select to import a project. Next, select to import a project from GitHub.
Next, you need to let GitHub know it's okay for code.stanford.edu to look at all of your repos. You do this by giving code.stanford.edu a token (which works sort of like a password, but only for specific tasks and scopes). In a new browser tab, go to [https://github.com/settings/tokens](https://github.com/settings/tokens), and click "generate token". Under "token description" enter something like code.stanford.edu, and select the "repo" scope (which allows code.stanford.edu to read all of your repos, and do a few other things). In the next screen, copy your personal access token. This is the only time you'll be able to copy the token you just generated, though if you make a mistake, you can generate a new one at any time.
Drop your access token into the code.stanford.edu browser tab, and list your repos. For the repos you want to imporpt, make sure that you have the correct namespace listed, and optionally change the repo name. Finally, click "import", and you should be done importing into GitLab.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment