文章

[Git]常用git指令備用

1.新增ssh key到 github,讓往後push 免帳號密碼

$ ssh-keygen -t rsa -C "your_email@example.com"
# Creates a new ssh key, using the provided email as a label
# Generating public/private rsa key pair.
# Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter]

然後到 ~/.ssh 資料夾底下打開 id_rsa.pub ,將ssh-rsa內容複製到 github伺服器上面。

$ ssh -T git@github.com 

這段指令可以測試是否有成功免帳號密碼登入 github

閱讀更多