cluster:usage_tips:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cluster:usage_tips:git [2022/09/09 14:23] lukabcluster:usage_tips:git [2022/10/25 11:15] (current) – [3. Step: Clone the new GitHub project to the cluster] matiasrus
Line 3: Line 3:
 How-to-Guide for connecting your GitHub account to the cluster, creating a new repository, cloning it to the cluster and collaborating on the cluster. How-to-Guide for connecting your GitHub account to the cluster, creating a new repository, cloning it to the cluster and collaborating on the cluster.
  
-==== 1. Step ==== +==== 1. Step: Connect Github Account ====
- +
-Set up a new Github repository on through the Github website (https://github.com) +
- +
- +
-==== 2. Step ====+
  
 **Connect your Github account to the cluster (more detailed info see: https://docs.gitlab.com/ee/user/ssh.html#add-an-ssh-key-to-your-gitlab-account)** **Connect your Github account to the cluster (more detailed info see: https://docs.gitlab.com/ee/user/ssh.html#add-an-ssh-key-to-your-gitlab-account)**
Line 14: Line 9:
 //(please skip if you have used GitHub on the cluster before)// //(please skip if you have used GitHub on the cluster before)//
  
-Create an SSH key on the cluster +Create an SSH key on the cluster:
  
 <code> <code>
Line 20: Line 15:
 </code> </code>
  
-Navigate to the folder where it was placed (usually in “/home/user/.ssh/id_ed25519_sk”) and copy the key (e.g. “SHA256:yHBHi3+bHUB92uByiByi5f+8+UdCMDaJUX0C23y2U”)+Navigate to the folder where it was placed (usually in “/home/user/.ssh/id_ed25519_sk.pub”) and copy the public key (e.g. “ssh-rsa AAAAB3NzaC1...= matiasrus@dunwich.sleep.ru.is”) 
 + 
 +Place the public key on your GitHub account in the browser under //your user > settings > SSH and GPC keys// 
 + 
 +==== 2. Step: Create Repository ==== 
 + 
 +Set up a new GitHub repository on through the Github website (https://github.com) 
 + 
 + 
 +==== 3. Step: Clone the new GitHub project to the cluster ==== 
 + 
 +You can find this shareable link on the start page of the repository using GitHub in the browser. If you are using a private repository, you additionally need to give your fellow users access rights. For this navigate to //settings > collaborators > add people// and add them through their GitHub user names.  
 + 
 +{{:cluster:usage_tips:screenshot_2022-09-09_at_11.15.18.png?400|}} 
 + 
 +<code> 
 +git clone git@github.com:hiluka/cluster_git.git 
 +</code> 
 + 
 +==== 4. Step: Collaborate! ==== 
 + 
 +Before you work on the project:  
 +<code> git pull </code> 
 + 
 +After you created new code files / plots / results:  
 +<code> git add [changed file or * for all files] </code>  
 + 
 +Then save your current state:  
 + 
 +<code> git commit -m “info about my updates” </code> 
 + 
 +Then push your state to the shared repository: 
 + 
 +<code> git push </code> 
 + 
 +If you need further introduction on Git practices see https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html 
 + 
 + 
  
-- Place the public key on your GitHub account in the browser under your user > settings > SSH and GPC keys 
  
  
  
  
  • cluster/usage_tips/git.1662733387.txt.gz
  • Last modified: 2022/09/09 14:23
  • by lukab