# 以 SSH 方式 push 到 GitHub SSH Key 產生 `ssh-keygen -f [KEY_FILENAME] -C [USERNAME]` 把 SSH 公鑰上傳到 GitHub 之後, 1. 若本地專案 Git 初始化過,輸入 `vi .git/config` 修改 [remote "origin"] 的 url 值為 GitHub 上 clone Repo 的 SSH 網址,就能成功 push 2. 若為新專案,則在 clone 時以 SSH 方式 clone 下來就可以了 若產生的 key 檔名為自定義(如 github),需要設置 `~/.ssh/config` ``` Host github.com IdentityFile ~/.ssh/github User [Username] ``` ###### tags: `SSH`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up