daily Programming: git ssh auth 該來還是會來
Tags: daily-programming, git, ssh-keygen
很早之前就
知道總有一天要改 ssh
今天用久違的 蘋果上部落格
就遇到拉!!!
我看這篇學的
預備知識
- ssh-keygen
authentication key generation, management and conversion
- pbcopy
pbcopy is simple enough to use, basically direct something into it, and it’ll copy it into the clipboard buffer. This can then be accessed either through pbpaste, or the standard Finder’s paste command (command-v).
- 來摟
- 產 ssh
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
pbcopy < "<<yourPath>>/.ssh/id_rsa.pub"
- 貼到 Github
- Settings -> SSH and GPG keys -> New SSH key
- 產 ssh
- 自己本機專案
remote
url https to sshgit remote set-url origin git@github.com:<username>/<reponame>.git