Difference between revisions of "Git"

From SGEES Wiki
Jump to navigation Jump to search
 
Line 31: Line 31:
 
=== 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.
 +
 +
As wiki pages are stored beside the main repository, wiki repository name will be MYREPO.wiki.git for MYREPO main repository
 +
 +
Here is step-by-step procedure:
 +
git clone https://git.geo.vuw.ac.nz/USERNAME/MYREPO.wiki.git
 +
cd MYREPO.wiki
 +
rename 's/\ /\-/g' *.md
 +
git add .
 +
git commit -m "wiki names fixed"
 +
git push

Latest revision as of 01:06, 29 May 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

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.

As wiki pages are stored beside the main repository, wiki repository name will be MYREPO.wiki.git for MYREPO main repository

Here is step-by-step procedure:

git clone https://git.geo.vuw.ac.nz/USERNAME/MYREPO.wiki.git
cd MYREPO.wiki
rename 's/\ /\-/g' *.md
git add .
git commit -m "wiki names fixed"
git push