12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Unix user と異なる user で git push する

Posted at

端末で使用している user 名が GitHub の user 名と異なる場合,適切な秘密鍵を持っていたとしても Push 時に以下のようなエラーが表示される.

$ git push origin develop
Error: Permission to github-user-name/repo denied to unix-user-name.

明示的に user を指定する場合は,.ssh/config に Host を設定し,IdentitiesOnly を yes にする.

$ vi ~/.ssh/config
Host github.com
  HostName github.com
  User github-user-name
  IdentityFile ~/.ssh/id_rsa
  IdentitiesOnly yes
12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?