GitHub Setup
May 1, 2024
Here is a quick writeup for my friend who needs to set up GitHub
- To generate key,
ssh-keygen -t rsa -b4096 -C "your_email_address"
`key.pub` is the public key while `key` is the private key
2. To start SSH agent (needs admin privileges),
# start the ssh-agent in the background
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Start-Service ssh-agent
3. Add your private key to SSH agent (use unprivileged terminal)
ssh-add C:\Users\YOU/.ssh/<your_private_key>
4. To connect a local directory to a remote directory (initially),
git remote add origin <remote-uri>
5. To overcome filename too long error (need admin privilege),
git config core.longpaths true