git add
やgit commit
はできるのにgit commit
ができない、そんな状況になってしまった
こんなエラー
nushell
> git push origin add_hq_max
The authenticity of host 'github.com (20.27.177.113)' can't be established.
ED25519 key fingerprint is SHA256:******************************************
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
RR-automate on add_hq_max [$] via 🐍 v3.12.2 took 1m53s
> git push origin add_hq_max
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
だいたいsshあたりのキーが読めないとかそんな問題かなと思っていた、例えば.ssh configあたりを読みに行ってないのかも、とか、、、
で検索するとstackoverflowでそれらしいのにひっかかった
Git under nushell not using added ssh-key - Stack Overflow
ssh.exeを指定すると治るらしい、sshのキーあれこれは関係ないような書きっぷりだ
これだけで動けばラッキー、簡単だ、と思ってやってみた
RR-automate on add_hq_max [$] via 🐍 v3.12.2
❯ git config --global core.sshcommand "C:/Windows/System32/OpenSSH/ssh.exe"
RR-automate on add_hq_max [$] via 🐍 v3.12.2
❯ git push origin add_hq_max
Enumerating objects: 48, done.
Counting objects: 100% (48/48), done.
Delta compression using up to 12 threads
Compressing objects: 100% (31/31), done.
Writing objects: 100% (31/31), 48.84 KiB | 1.63 MiB/s, done.
Total 31 (delta 17), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (17/17), completed with 13 local objects.
remote:
remote: Create a pull request for 'add_hq_max' on GitHub by visiting:
remote: https://github.com/tontoroRR/RR-automate/pull/new/add_hq_max
remote:
To github.com:tontoroRR/RR-automate.git
* [new branch] add_hq_max -> add_hq_max
ちゃんと動いた!ラッキーだ
気を付けなくてはいけないのはパスの区切りには「¥」ではなく「/」を使うということ、「¥」だとエスケープされてしまう
それだけ押さえておけばOK