简体   繁体   中英

Git clone works but fetch fails using plink SSH

Git clone works fine without asking for any ssh info using plink.exe. However git fetch fails with Permission denied (publickey). GIT_SSH is set to plink.exe

Always use the "git" user All connections, including those for remote URLs, must be made as the "git" user. If you try to connect with your GitHub username, it will fail:

$ ssh -T GITHUB-USERNAME@github.com

Permission denied (publickey). If your connection failed and you're using a remote URL with your GitHub username, you can change the remote URL to use the "git" user.

You should verify your connection by typing:

$ ssh -T git@github.com

Hi username. You've successfully authenticated...

refer link: https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM