Closed georgebuzzell closed 3 years ago
@georgebuzzell As part of my resource collation efforts, I'd like to ensure we avoid unnecessary duplication on the wiki since duplication>discrepancy>user confusion.
I have found two existing wiki resources for installing Git:
Questions:
@jessb0t yes, agree that setting up git and ssh keys should be on the getting started with git/github page, then, the pavlovia page says todo those things first and describes how to integrate your existing ssh key with gitlab, how to use gitlab, pavlovia, etc.
@georgebuzzell @F-said @Jonhas @SDOsmany @stevenwtolbert
Requesting assistance with instructions for SSH authentication, geared at a non-tech audience. :smile: I understand the main idea of authentication, but I don't understand it well enough to explain to a neophyte. I have found (at least) two GitHub pages devoted to this question, although I'm sure there are others: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh https://docs.github.com/en/github-ae@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Can one of you help me:
My aim is to make this all seem very simple/non-scary by walking new lab members through the steps, but doing so without holding their hand so much that they don't learn anything from the experience. I'm including below some examples of other instructions to show what I mean about balancing clarity, simplicity, and empowerment.
Thank you so much!! J
Set up your identity by typing two commands into your shell:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
(Obviously, replace John Doe and johndoe@example.com with your actual name and your actual e-mail. If you're not sure whether you've done this before, check with the command git config --list
.)
$ brew install git
If you encounter issues, check out the main download page, direct from Git.
@F-said if you have time to do this, please do, but, you also have several other things you are working on, so, please feel free to ask me to do it by responding and @'ing me!!
@georgebuzzell @F-said @Jonhas @SDOsmany @DavyNeat @stevenwtolbert @CamachoBry @yanbin-niu
Hey all! I just wanted to re-ping on my request for help here (and add David, Bryan, and Yanbin to the mix...welcome to the party!). I'm re-pasting the original request below since this issue has a looooong chain of comments (and I don't want to waste your time sorting through them).
Thank you for your guidance! J
Requesting assistance with instructions for SSH authentication, geared at a non-tech audience. 😄 I understand the main idea of authentication, but I don't understand it well enough to explain to a neophyte. I have found (at least) two GitHub pages devoted to this question, although I'm sure there are others: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh https://docs.github.com/en/github-ae@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Can one of you help me:
My aim is to make this all seem very simple/non-scary by walking new lab members through the steps, but doing so without holding their hand so much that they don't learn anything from the experience. I'm including below some examples of other instructions to show what I mean about balancing clarity, simplicity, and empowerment.
Thank you so much!! J
Establish your identity
Set up your identity by typing two commands into your shell:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
(Obviously, replace John Doe and johndoe@example.com with your actual name and your actual e-mail. If you're not sure whether you've done this before, check with the command git config --list
.)
Install Git on Mac
$ brew install git
@georgebuzzell @F-said @Jonhas @SDOsmany @DavyNeat @stevenwtolbert @CamachoBry @yanbin-niu
Or are SSH keys even the right way to go? I just did a bit more hunting and it seems like personal access tokens might be a more optimized authentication method? (Full disclosure: I don't understand the technical difference between these options.)
Hey, @jessb0t the following is how to set up git on a lab member's local using both personal access tokens or the SSH key, according to the user's preference.
In my experience, using the SSH key is usually for version control services that do not offer personal access tokens (for example, assembla), or just for anyone that wants that additional security, but correct me if I'm wrong @NDCLab/base-eeg-team
Git is a command-line version-control software that allows users to remotely install and modify lab software and projects. While GitHub is a software tool that utilizes git to host remote repositories which will then be shared across users/organizations/the world.
The following outline describes hooking git with a GitHub account, and using git in the HPC Linux environment:
To integrate a GitHub account with Git, a user has the following options (Personal Access Token preferred due to simplicity). The following steps assume that the user has git installed to their machine and a GitHub account created.
A personal access token allows users to use their GitHub account w/o verifying passwords at every instance of cloning, committing, forking, etc. To integrate a GitHub account you must follow the outlined steps as listed in the GitHub documentation
The following assumes that SSH is installed on your local machine. Windows 10/MacOS/Linux come with SSH. You can validate through:
ssh -v localhost
Which should print the version number and a failed connection.
If this command does not work, download OpenSSH
ssh-keygen -t ed25519 -C "your_email@example.com"
Hit enter when prompted:
Enter a file in which to save the key (/c/Users/you/.ssh/id_ed25519):[Press enter]
And enter when prompted to generate a password (no password protection for minimal layers)
Enter passphrase (empty for no passphrase): Enter same passphrase again:
cat ~/.ssh/id_rsa.pub
For Windows, where USERNAME
is the user's Windows user name
type C:\Users\USERNAME.ssh\id_rsa.pub
. Copy the outputted key to your Clipboard, then paste it to your GitHub account settings:
Test your SSH connection
ssh -T -p 443 git@ssh.github.com You should see: Hi [username]! You've successfully authenticated, but GitHub does not provide shell access.
By ssh'ing into GitHub, it should be listed as a known_host within your .ssh
file. Check through:
For Unix/MacOS:
cat ~/.ssh/known_hosts
For Windows, where USERNAME
is the user's Windows user name
type C:\Users\USERNAME.ssh\known_hosts
Git on the HPC login node should only be used for project downloading & data analysis (through Slurm scripts), while development should occur on a personal machine.
Without associating a user account on the HPC, repositories could be cloned in "read-only" mode which is preferable given development should not be happening on the cluster.
However, a GitHub account (and subsequent write priveledges) could be associated by attaching the user name and password while on the cluster:
Attach user name, where "GitHub user name" is your user name
git config --global user.name "GitHub user name"
Attach email, where "your_email@example.com" is your GitHub associated email
git config --global user.email "your_email@example.com"
Set up personal access token or SSH key on HPC cluster (TO BE EDITED)
Closed with #56.
Some starting resources: https://ohmygit.org/ https://lab.github.com/