README.md 7.16 KB
Newer Older
1
[[_TOC_]]
Xueshan Feng's avatar
Xueshan Feng committed
2

Xueshan Feng's avatar
Xueshan Feng committed
3
## Why do I get "422 Error" when sign-in?
Xueshan Feng's avatar
Xueshan Feng committed
4
5

If you get this error the first time your sign-in, most likely, your email contact information in StanfordYou
Xueshan Feng's avatar
Xueshan Feng committed
6
is either private or doesn't exist. It can be caused by sponsorship changes.
Xueshan Feng's avatar
Xueshan Feng committed
7

8
9
10
11
12
code.stanford.edu service requires your email address to log you in. You should be able to go to stanfordyou.stanford.edu and 
add your email address - click on 'Maintain your directory and AlertSU emergency contact information', then click 'change...' next to 
'SU Contact Info'. You need at least Stanford visibility for your email address. 

For detailed instructions how to fix
Xueshan Feng's avatar
Xueshan Feng committed
13
"mail" address, see [here](https://stanford.service-now.com/nav_to.do?uri=%2Fkb_view.do%3Fsys_kb_id%3D09218e6edb477b8419d458d6dc96191e%26sysparm_rank%3D2%26sysparm_tsqueryId%3D314c12f9dbb78c5c995477578c9619c9).
Xueshan Feng's avatar
Xueshan Feng committed
14

Xueshan Feng's avatar
Xueshan Feng committed
15
## **What are GitLab usage policies and limits?**
Xueshan Feng's avatar
Xueshan Feng committed
16
17
18
19
20
21
22
23
24
25
26
27

* PHI data: NO
* Default personal repository limit: *50*
* Maximum attachment size (MB): *10*
* Maximum push size (MB): *500*
* Group projects limit: No limit
* Default artifacts expiration: 30 days (you can override in .gitlab-ci.yml)

Container Registry images uploaded to GitLab Registry Service doesn't have size limit.

For large size repository, consider to use [GitLab LFS](https://docs.gitlab.com/ee/workflow/lfs/manage_large_binaries_with_git_lfs.html).

Xueshan Feng's avatar
Xueshan Feng committed
28
## How do I get help?
Xueshan Feng's avatar
Xueshan Feng committed
29

Xueshan Feng's avatar
Xueshan Feng committed
30
31
For general usage questions, Use [Gitlab's help](https://code.stanford.edu/help) documetation. For backend server code.stanford.edu related
questions, please submit a [HelpSU](https://helpsu.stanford.edu/?pcat=itarch) ticket.
Xueshan Feng's avatar
Xueshan Feng committed
32

33
34
You can also join *git* slack channel on [StanfordCop team] (https://stanfordcop.slack.com).

Xueshan Feng's avatar
Xueshan Feng committed
35
## What is the minimum setup before I start using GitLab?
Xueshan Feng's avatar
Xueshan Feng committed
36
37
38

Most of your profile settings are already populated from Stanford directory when you sign up with GitLab,  such as your account id (sunetid), name, email. You should not change these.

Xueshan Feng's avatar
Xueshan Feng committed
39
You can click **Profile Settings** button on the left panel to change default appearance for your GitLab web interface. You definitely want to look into the "SSH Keys" tab. In this tab, click the "Add SSH Key" button to add SSH keys so you can communicate with GitLab through git command.
Xueshan Feng's avatar
Xueshan Feng committed
40

41

42
43
##  What are the IP addresses I should whitelist if I run services behind firewall?

Xueshan Feng's avatar
Xueshan Feng committed
44
45
46
47
Note that code.stanford.edu does not have firewall on port 443, port 22 to restrict access to its console or through command line.

If your system cannot access to it, you may need to do one of the followings:

Xueshan Feng's avatar
Xueshan Feng committed
48
49
- **34.83.239.226**: GitLab instance's static NAT address. If you use webhooks to other services that
is behind a firewall, you need to whitelist this NAT address.
50

Xueshan Feng's avatar
Xueshan Feng committed
51
52
- **35.233.234.95**: GitLab public service IP (code.stanford.edu). If your network has outgoing firewall, you
need to whitelist this public IP.
53

Xueshan Feng's avatar
Xueshan Feng committed
54
55
## How to generate and upload GitLab ssh-key?

Xueshan Feng's avatar
Xueshan Feng committed
56
57
* [Generate ssh-key](http://doc.GitLab.com/ce/ssh/README.html)
* [Add ssh-key](http://doc.GitLab.com/ce/GitLab-basics/create-your-ssh-keys.html#add-your-ssh-key)
Xueshan Feng's avatar
Xueshan Feng committed
58

Xueshan Feng's avatar
Xueshan Feng committed
59
## What is a GitLab project?
Xueshan Feng's avatar
Xueshan Feng committed
60

Xueshan Feng's avatar
Xueshan Feng committed
61
A GitLab project is all things about a project: a git repository, wiki, issues, documentations, etc.
Xueshan Feng's avatar
Xueshan Feng committed
62

Xueshan Feng's avatar
Xueshan Feng committed
63
## What is the username space?
Xueshan Feng's avatar
Xueshan Feng committed
64

Xueshan Feng's avatar
Xueshan Feng committed
65
66
67
68
69
70
When you create a new project in GitLab, the default namespace for the project is the personal namespace associated with your GitLab userid. The git repositories created in your personal namespace looks like this:

```
git@code.stanford.edu:<sunetid>/<project>.git
```

Xueshan Feng's avatar
Xueshan Feng committed
71
## How many personal GitLab projects I can create?
Xueshan Feng's avatar
Xueshan Feng committed
72

Xueshan Feng's avatar
Xueshan Feng committed
73
The default personal project limit is *50*.
Xueshan Feng's avatar
Xueshan Feng committed
74

Xueshan Feng's avatar
Xueshan Feng committed
75
## What is the default project visibility?
Xueshan Feng's avatar
Xueshan Feng committed
76

Xueshan Feng's avatar
Xueshan Feng committed
77
Project visibility level in GitLab can be either private, internal or public. The default is **private**. As a project owner, you can change your project visibility by using your projetct's "Settings" function.
Xueshan Feng's avatar
Xueshan Feng committed
78

Xueshan Feng's avatar
Xueshan Feng committed
79
## What is a GitLab group?
Xueshan Feng's avatar
Xueshan Feng committed
80

Xueshan Feng's avatar
Xueshan Feng committed
81
Gitlab group allows you group projects together into one namespace (directory), so you can give other users permission to all projects in one place. You are allowed to create groups or transfer personal projects to a group that you own. Here is more information about [GitLab groups](http://doc.GitLab.com/ee/workflow/groups.html#GitLab-groups).
Xueshan Feng's avatar
Xueshan Feng committed
82

Xueshan Feng's avatar
Xueshan Feng committed
83
84
## Are we able to add non-Stanford users to contribute to a repository?

Xueshan Feng's avatar
Xueshan Feng committed
85
86
Not at this time. You will need to sponsor a Stanford account to use the service. Base accounts are subject to
be blocked by life-cycle maintenance process because of the lack of means to validate external email addresses. Full sunetid is recommended.
Xueshan Feng's avatar
Xueshan Feng committed
87

Xueshan Feng's avatar
Xueshan Feng committed
88
## Is GitLab integrated with Stanford's workgroup?
Xueshan Feng's avatar
Xueshan Feng committed
89

Xueshan Feng's avatar
Xueshan Feng committed
90
Not yet. You can freely assemble your project team from members in different groups.
Xueshan Feng's avatar
Xueshan Feng committed
91

Xueshan Feng's avatar
Xueshan Feng committed
92
## I accidentally deleted my repository, how do I restore it?
93

Xueshan Feng's avatar
Xueshan Feng committed
94
You are asked to confirm the deletion; If you still delete it, you maybe  able to find a checked-out repo on your computer, and
95
96
97
98
99
100
101
can use it to re-create your repo; If you or your co-workers don't have a local copy, then file a HelpSU ticket, we can
help you to get it from DR backups. The backup file is a repoistory.bundle package (actually a tar file). To restore from a bundle:
```
$ mkdir ~/mygit-bundle
$ cd  ~/mygit-bundle && tar xvf <path-to-bundle-file>
$ git clone ~/mygit-bundle <path-to-new-repo>
```
102

103
## How do I get notification for scheduled maintenance outage?
Xueshan Feng's avatar
Xueshan Feng committed
104
105
106
107
108
109
110
111
112

GitLab standing upgrade maintenance window is on Fridays from 9 p.m. to 11 p.m.  This schedule is outside of
UIT’s regular Thursday,  Saturday, and Sunday maintenance window so regular changes can use GitLab service for 
code releases or CI/CD jobs.

The actual scheduled upgrade, impact, and outage duration will be posted on https://code.stanford.edu and you also get notification on each git command line push if there is an active schedule.

If you have automated jobs that need to connect to the service, please put them outside of the standing maintenance window. It is also a good practice to add retires to improve application resilience.

Xueshan Feng's avatar
Xueshan Feng committed
113
## How do I migrate github project to GitLab?
114
115
116
117
118

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.

Xueshan Feng's avatar
Xueshan Feng committed
119
Drop your access token into the code.stanford.edu browser tab, and list your repos. For the repos you want to import, 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.