Skip to content

Instantly share code, notes, and snippets.

@GINK03
Created February 4, 2018 10:46
Show Gist options
  • Select an option

  • Save GINK03/a0de642274b04b6a6c5e92b9d2aec2bd to your computer and use it in GitHub Desktop.

Select an option

Save GINK03/a0de642274b04b6a6c5e92b9d2aec2bd to your computer and use it in GitHub Desktop.
GITHUBにsshkeyでpushする

~/.ssh/configファイルを作成

以下のようにする

Host github.com                                  
  User git                                       
  Port 22                                        
  HostName github.com                            
  IdentityFile ~/.ssh/my-servives                
  TCPKeepAlive yes                               
  IdentitiesOnly yes 

で、例えば、sshkeyをmy-servicesとすると .ssh/my-servicesにchmod 600しる

git remote設定で今見ている設定を、httpsからgitプロトコルにすると、pushとか諸々できるっぽい

git remote set-url origin git@github.com:GINK03/bing-ranking-spectre.git  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment