An online discussion and research collaboration forum centred around our current academic events and popular research areas. To access Community, please register using one of the available social options and then complete the sign-up process. You’ll then be added into the relevant groups to access the private discussion areas for your event(s).
A code collaboration and sharing platform for event participants.
SSH is a communication protocol which enables secure connections and data transfers between two hosts. It consists of a key pair – one half public, one half private. The public key part ends with the
.pub file extension, whereas the private part does not. Never share the private key. To instruct
git to push to Codehive, we’ll add the public part to your Codehive account.
This guide has been collated and adapted from the GitHub (Checking for existing SSH keys, Generating a new SSH key and adding it to the ssh-agent) and GitLab and SSH keys.
ls -al ~/.sshto see if existing SSH keys are present:
$ ls -al ~/.ssh # This lists the files in your .ssh directory, if they exist
If you don’t have an existing public and private key pair, or don’t wish to use any that are available to connect to GitHub, then skip to the generate a new SSH key section.
If you see an existing public and private key pair listed (for example id_rsa.pub and id_rsa) that you would like to use to connect to Codehive, skip to the add your SSH key to the ssh-agent section.
$ ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org"
This creates a new ssh key, using the provided email as a label.
> Generating public/private rsa key pair.
> Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]
> Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]
> Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
At the prompt, type a secure passphrase. For more information, see “Working with SSH key passphrases”.
> Enter passphrase (empty for no passphrase): [Type a passphrase] > Enter same passphrase again: [Type passphrase again]
$ eval "$(ssh-agent -s)" > Agent pid 59566
$ ssh-add ~/.ssh/id_rsa
These steps will need to be done each time your machine is rebooted.
pbcopy < ~/.ssh/id_ed25519.pub
Linux (requires the xclip package)
xclip -sel clip < ~/.ssh/id_ed25519.pub
Git Bash on Windows
cat ~/.ssh/id_ed25519.pub | clip
If you’re using an RSA key, substitute accordingly.
http://www.codehive.newton.ac.ukand sign in.
Lines in blocks below are to be typed into a Terminal.
Git global setup
git config --global user.name "Your name" git config --global user.email "Your email"
Create and push a new repository
git clone https://www.codehive.newton.ac.uk/staff/project_name.git cd project_name touch README.md git add README.md git commit -m "add README" git push -u origin master
Push an existing Git Repository
cd existing_repo git remote rename origin old-origin git remote add origin https://www.codehive.newton.ac.uk/staff/project_name.git git push -u origin --all git push -u origin master