0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCode、CodeCommitでgit commit/pushを操作する

Last updated at Posted at 2024-08-13

間違えてたこと

wslなのでssh_configはwsl側で作っていたが、vscodeがwindowsのC:\Users\user\.ssh\configを見ていた
->原因はvscodeのgitがwindowsのgitを使っているためと思われる。なので秘密鍵とかは一式windows側に設置しないとだめと思われる。.gitconfigもかも

C:\Users\user\.ssh\config

UserKnownHostsFile ~/.ssh/known_hosts

Host git-codecommit.*.amazonaws.com # codecommitを扱うときはこれでよい
    User XXXXXXX # AWS CodeCommit の SSH 公開キーのSSH キー ID
    IdentityFile ~/.ssh/id_rsa # awsのec2にログインする鍵(と一緒にしている)

その後、普通にできる。
git cloneもwsl側にしなくても大丈夫だった。
Userは指定しないと、デフォルトec2-userでcodecommitにアクセスして失敗する

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?