LNCD

Table of Contents

  • LNCD Home
  • Administration
  • Notebooks
  • Journal Club Presentations
  • Publications
  • Current Projects
  • Completed Projects
  • Current Grants
  • Datasets by Project
  • Brain ROIs and Measures
  • ️Tools And Methods
  • Big Data
  • RA Homepage
  • Recent Changes
  • Maintenance
  • Site Map
  • Random Page
LNCD
Docs » Github setup

This is an old revision of the document!


Github setup

Github setup includes - creating or finding an existing remote github repository url - syncing that with your files (on your computer, on rhea, on PSC, etc) - authenticating with github for git push permissions

New Repo

If you have an existing directory you want to put on github, DO NOT generate a readme when creating the github repository.

  • http://github.com/new or Home > green new repo
  • Follow form to assign a name. only add readme, lic, etc if no project files exist yet
  • Follow the instructions github provides
    add_remote.bash
    cd my-exsiting-data/ # go to the directory of your existing code
    git remote add origin git@github.com:$USER/$REPONAME
    git push -u origin main

Existing Repo

  • Copy the ssh url of your new repository. Green <> Code button > Local Tab > SSH header.

  • Clone the copied url like git clone git@github.com/$USER/$REPO

Authentication

ssh keys

git push can use ssh authentication. You need a key likely in ~/.ssh/id_ed25519.pub.

Contents of ~/.ssh/id_ed25519.pub should be pasted into new ssh key modal on https://github.com/settings/keys 1)

If ~/.ssh/id_ed25519.pub doesn't exist, ssh-keygen can make it (use empty password for convenience. hit enter at password prompt to leave blank). See more documentaiton on github

ssh-keygen only needs to be run once per user per computer. Do not rerun if any ~/.ssh/id*.pub file exists – you risk deleting your key

https app pass

To push to https (vs ssh like git@) repos, you'll need to use a personal authentication token when prompted for a password. See github's documentation

1)
top right user icon→settings→ssh and GPG keys → new ssh key
Previous Next