Difference between revisions of "Git"

From SGEES Wiki
Jump to navigation Jump to search
Line 11: Line 11:
 
Two protocols: https and ssh ("SSH Keys") are supported.
 
Two protocols: https and ssh ("SSH Keys") are supported.
  
To import your public SSH key into your Git profile navigate to https://git.geo.vuw.ac.nz/user/settings/keys
+
==== Import Public SSH Key ====
and follow the instructions at https://help.github.com/articles/generating-ssh-keys
+
;a) Copy your local public SSH key stored in file <nowiki>~/.ssh/id_rsa.pub</nowiki> to clipboard
 +
;* In Windows this file could be found at <nowiki>C:\Users\<YOUR_USER>\.ssh\id_rsa.pub</nowiki>
 +
(this is a text file containing a single line which looks like 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA...LONG_LINE_OF_RANDOM_CHARACTERS.....VQ== user@example.com')
 +
;a.1) If there is no such file,
 +
then you need to generate one. Run <code>ssh-keygen</code> and press Enter several times for default options confirmation.
 +
 
 +
;b) Go to import page at
 +
https://git.geo.vuw.ac.nz/user/settings/keys , select "Manage SSH Keys" section, and click on "Add Key" button.
 +
 
 +
;c) Paste the key and assign some meaningful name for it (like "My home laptop")
 +
 
 +
;d) Update protocol for existing local clones
 +
In the local copy of repository change origin address (assume the repository name is "MYREPO" and your SGEES Linux login is "snowjon")
 +
cd /path/to/MYREPO
 +
git remote set-url origin git@git.geo.vuw.ac.nz:snowjon/MYREPO.git
 +
;e) Repeat a--d for all other computers from which you might need access to git server
  
 
=== Known Issues ===
 
=== Known Issues ===
 
Gitea wiki engine uses a different naming convention (it conforms to GitHub standards), so if your old GOGS repository had a Wiki, you will have to clone wiki repo and rename all .md files with spaces in them either manually or using bash script to automate this.
 
Gitea wiki engine uses a different naming convention (it conforms to GitHub standards), so if your old GOGS repository had a Wiki, you will have to clone wiki repo and rename all .md files with spaces in them either manually or using bash script to automate this.

Revision as of 22:58, 15 April 2020

Git Web server for all SGEES Linux users is running at https://git.geo.vuw.ac.nz

Web interface is very similar to GitHub so you might find it convenient for your school collaborative or private projects (code, documents, theses). Free volume size for repositories is about 1 Tb - fair enough for various projects but definitely not suitable for large data sets.

Access

Please use your Linux account credentials for log in to web interface. For security reasons new user logins are blocked by default. Please ask system administrator to open access for you.

Protocols supported

Two protocols: https and ssh ("SSH Keys") are supported.

Import Public SSH Key

a) Copy your local public SSH key stored in file ~/.ssh/id_rsa.pub to clipboard
  • In Windows this file could be found at C:\Users\<YOUR_USER>\.ssh\id_rsa.pub

(this is a text file containing a single line which looks like 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA...LONG_LINE_OF_RANDOM_CHARACTERS.....VQ== user@example.com')

a.1) If there is no such file,

then you need to generate one. Run ssh-keygen and press Enter several times for default options confirmation.

b) Go to import page at

https://git.geo.vuw.ac.nz/user/settings/keys , select "Manage SSH Keys" section, and click on "Add Key" button.

c) Paste the key and assign some meaningful name for it (like "My home laptop")
d) Update protocol for existing local clones

In the local copy of repository change origin address (assume the repository name is "MYREPO" and your SGEES Linux login is "snowjon")

cd /path/to/MYREPO
git remote set-url origin git@git.geo.vuw.ac.nz:snowjon/MYREPO.git
e) Repeat a--d for all other computers from which you might need access to git server

Known Issues

Gitea wiki engine uses a different naming convention (it conforms to GitHub standards), so if your old GOGS repository had a Wiki, you will have to clone wiki repo and rename all .md files with spaces in them either manually or using bash script to automate this.