Getting Started with the Cedarville Software Repository (repo.cedarville.edu)

Cedarville IT has recently started offering hosted Git Repositories via a GitLab instance at https://repo.cedarville.edu

GitLab is a service, similar to GitHub, that can be used to store versioned file repositories (most frequently, code). 

Signing Into Cedarville's Software Repository

Navigate in a browser to https://repo.cedarville.edu

(Note: you must be connected to a Academic/Administrative network on campus or be connected to VPN in order to access GitLab)

Click the Cedarville Login (Azure) button. You will be redirected to the usual CU login page. Log in with your email address and password. You will be required to use Two-Factor Authentication to sign into the Software Repository. 

Option 1: Web IDE

From a project, you can begin to edit files and commit changes using GitLab's built-in IDE. 

To do this, you'll need to navigate to the project/file you'd like to edit, and from the Edit menu, select "Edit in Web IDE". 

This will open a version of Visual Studio Code that runs right in your browser. 

The first thing to do once it opens is to make sure you're editing on the right branch. You can switch branches by clicking on the branch name (probably "main" or "master" by default), in the lower left-hand portion. Some repositories won't let you commit to master. 

When you know you're on the right branch, select the file(s) you'd like to change from the sidebar, and make the changes. You don't need to save -- the changes will save automatically, but they won't be kept unless you make a commit. 

To do that, choose the Version Control icon from the left sidebar, and enter a commit message indicating what the purpose of your changes. Finish the commit, which will save the changes to the branch you have selected. 

A window will pop up after you commit, prompting you to make a Merge Request (MR). You can click the MR button to automatically begin a merge request to move your changes into another branch. 

Option 2: Local

Install a Git Client

You'll need a Git client in order to interact (commit, push, pull, merge, etc) with the code stored on the Software Repository. Here a links to a few of our favorites: 

  1. (Command-Line Only) Git for Windows
  2. (Command-Line Only) Git for MacOS
  3. (Graphical UI) Git GUIs for Windows
  4. (Graphical UI) Git GUIs for MacOS
  5. (Graphical UI) GitHub Desktop
  6. Your IDE  of choice probably comes with an integrated Git client (eg. PyCharm, Visual Studio, VSCode, Sublime Text, etc)

Setting up your account to Push & Pull code

There are two options for allowing Git to access your code in the Software Repository

  1. SSH, using a Private/Public keypair
  2. HTTPS, using in Personal Access Token
     

Setup SSH Access 

  1. Generate an SSH KeyPair. You can use the ssh-keygen command on MacOS/Linux, (and Windows, if you install the OpenSSH Client). You can also use PuTTYGen in Windows. More details are available in the GitLab Documentation
  2. Get the public key portion of the pair.
    1. Locate your public key file. This is usually available in a file called id_rsa.pub in the .ssh folder of your user directory (~/.ssh/ on MacOS & Linux, and C:\users\<username>\.ssh on Windows).
    2. Open the file in a text editor (such as NotePad or TextEdit).
    3. Copy the text from the file. Make sure you get all of it. 
  3. Add your public key to your User Account
    1. In the Software Repository, click your user icon in the top right, and choose "Edit Profile"
    2. In the left sidebar, click "SSH Keys"
    3. Paste in the text you copied to the box, name the key appropriately, and click "Add Key"
  4. Make sure your Git Client is set up to use the keypair you created. Most will look by default in the correct folder, but some may not. Check the documentation for your Git client to be sure. 
  5. Make sure you use Git URI's that begin with "git@repo.cedarville.edu..." 
     

Set up a Personal Access Token (HTTPS Access)

  1. In the Software Repository, click your user icon in the top right, and choose "Edit Profile"
  2. In the left sidebar, click "Access Tokens"
  3. Set the token name to something recognizable
  4. Optionally, set an expiration date. After this date, the token will no longer work. 
  5. Check all the following boxes (assuming you want to be able to commit to the repository using this key):
    1. api
    2. read_user
    3. read_api
    4. read_repository
    5. write_repository
  6. Click "Create personal access token"
  7. In your Git Client, make sure you select HTTPS authentication, and use Git URI's that start with https://repo.cedarville.edu...

Keep Learning about Git, GitLab and Versioning

The following link will take you to the GitLab documentation, where you can learn more about how to use the software behind the Cedarville Software Repository. Additional links below offer more training and tutorials on using Git & Gitlab

Was this helpful?
0 reviews

Details

Article ID: 142157
Created
Fri 3/18/22 12:36 PM
Modified
Fri 3/1/24 10:50 AM