web-based platform that hosts git repositories online
-
repository (repo): storage location for a project containing all its files, history, and configuration
- can contain code, documentation, images, and other project-related files
- tracks all changes made to files in your project
-
branch: allow you to work on different versions of your project at the same time without mixing up new features or bug fixes until they’re ready
-
fork: personal copy of someone else's project
-
pull request: submit changes from one branch to another
- typically used to propose changes to a project
- allows for discussion and review before merging changes
-
issues: github feature that tracks tasks, enhancements, or bugs
- can be used to:
- track bugs and feature requests
- assign work to team members
- organize project tasks
- collect user feedback
- can be used to:
-
upstream vs downstream: describe the direction of data flow between repos (normally between forks of a repo)
- upstream repository: original source of code, where a copy (fork) came from
- downstream repository: code that is receiving updates (fork)
rm ~/.ssh/id_ed25519 && rm ~/.ssh/id_ed25519.pub- generate SSH keys
ssh-keygen -t ed25519 -C "your_email@example.com"-
you will be prompted to choose file location to save the key, just press enter to accept default location
-
you will be prompted to choose password, insert your password
-
add SSH key to SSH agent
eval "$(ssh-agent -s)"- add SSH private key to SSH agent
reasons to add to SSH agent:
- you won't need to enter the password every time you use the key
- it's safer, because the agent will save the SSH keys encrypted in memory
ssh-add ~/.ssh/id_ed25519- add SSH key to github account
copy ssh public key
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboardnavigate to Github's "SSH and GPG keys" section
select "new SSH key" button
choose title of key
for key type, choose "Authentication Key"
paste public SSH key
- test SSH connection
ssh -T git@github.comyou should see a message like this:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
- update dotfiles repo
rm ~/dotfiles/.ssh/id_ed25519 && rm ~/dotfiles/.ssh/id_ed25519.pubcp ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub ~/dotfiles/.sshImportant
don't forget to encrypt keys before adding to github repo
ansible-vault encrypt ~/dotfiles/.ssh/id_ed25519ansible-vault encrypt ~/dotfiles/.ssh/id_ed25519.pubyou can decrypt the SSH keys later if necessary:
ansible-vault decrypt ~/dotfiles/.ssh/id_ed25519ansible-vault decrypt ~/dotfiles/.ssh/id_ed25519.pub