回答編集履歴

1

更新

2022/07/16 13:16

投稿

bsdfan
bsdfan

スコア4560

test CHANGED
@@ -1,7 +1,16 @@
1
- gitに接続するユーザ名がmacのログイン名になっているためです。
1
+ 今の設定では、gitに接続するユーザ名がmacのログイン名になっているためです。
2
+ それはssh/configとgitの remote urlのミスマッチが原因です。
3
+
4
+ 対応として、まず、ssh/config の Host を github ではなく、github.com にする。
5
+ ```
6
+ Host github.com
7
+ IdentityFile ~/.ssh/id_rsa
8
+ User git
9
+ ```
10
+
2
- remoteのurlを `git@github.com:ユーザ名/gitdocker.git` にしましょう。
11
+ ついでに、remoteのurlを `git@github.com:ユーザ名/gitdocker.git` にし
12
+ ユーザ名を明示的にしておくのもいいかもしれません。
3
13
 
4
14
  ```
5
15
  git remote set-url origin git@github.com:ユーザ名/gitdocker.git
6
16
  ```
7
-