首页 > 其他分享 >Git clone is not working suddenly with SSH connection in win 10

Git clone is not working suddenly with SSH connection in win 10

时间:2022-09-23 15:02:15浏览次数:50  
标签:10 Git key working git ----- ssh file SSH

When do git clone, it always show 

[email protected]'s password

When use SSH protocol, it is not suppose to show this message, only enter private key passphrase for the key file if private key got this, but not sure why it show this message, all is working fine previously.

Here is my solution for this:

1: add config file under path:

C:\Users\SkyR\.ssh

Content is like below:

#########config file start#######

Host github.com
#User [email protected]
Hostname ssh.github.com
#PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
#Port 443

#########config file end#######

 

2: Convert Putty key format to OpenSSH key format(previous i use Pageant to load ppk to served for git command) with Putty Key Generator tool(after install putty, this tools will be installed as well)

After load private key(eg: privatekey.ppk)

Conversions -- Export OpenSSH key -- save it named "id_rsa"(i think file name can be updated from config file under same path)

openssh key file content start with like:

-----BEGIN OPENSSH PRIVATE KEY-----

.......................................................

-----END OPENSSH PRIVATE KEY-----

 

3: if use Tortorise git, then change the SSH client tool from 

C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe to C:\Program Files\Git\usr\bin\ssh.exe

 

4: do git pull or clone again, it works again....

 

标签:10,Git,key,working,git,-----,ssh,file,SSH
From: https://www.cnblogs.com/renren0113/p/16722760.html

相关文章

  • 【NEERC2011】【GYM100085F】Flights 题解
    【NEERC2011】【GYM100085F】Flights题意给定\(n\)个抛物线,保证开口向下且与\(x\)轴的两个交点都在\(x\)轴正半轴或原点。\(m\)次询问,每次询问给定四个数\(L,R,......
  • gitlab部署
    目录gitlab部署gitlab管理gitlab部署//关闭防火墙和selinux[root@localhost~]#systemctldisable--nowfirewalld.serviceRemoved/etc/systemd/system/multi-use......
  • 微盟电子MEQ6310系列
    低压差低噪声电压调节器微盟电子MEQ6310概述微盟产品MEQ6310从2.6v到6v的输入电压,可提供150mA负载电流。低压差、低静态电流和低噪声使其使用于低功耗应用和电池供电系统......
  • C语言经典算法100例
    【程序1】题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?#include<stdio.h>#include<stdlib.h>intmain(){inti,j,k,m;......
  • git常用命令
    1、如何克隆仓库代码到本地?命令:gitclonehttp://******2、如何创建新分支test?  命令:gitbranchtest3、查看本地分支?命令:gitbranch4、如何切换到分支test?命令......
  • 小乌龟(TortoiseGit)在push时总是要求输入密码的解决办法
    当你在用TortoiseGit拉取或者提交代码的时候,可能遇到过git小乌龟总是要让你输入密码,无法拉取、提交代码,见下图。怎么解决这个问题? 1.复制私钥文件id_rsa,将复制的文件......
  • Windows10内置Linux子系统(WSL)Vmmem内存占用过大问题
    按下Windows+R键,输入%UserProfile%并运行进入用户文件夹新建文件.wslconfig,然后记事本编辑输入以下内容并保存,memory为系统内存上限,这里我限制最大2gb[wsl2......
  • 浅学git工具
    1.git工具介绍及使用git工具直接安装:直接运行exe文件进行安装,按默认的操作点击下一步就行了校验:在DOS命令行中输入:git --version如果能正常显示出对应的版本就是ok......
  • AttributeError: module 'win32com.gen_py.45541000-5750-5300-4B49-4E47534F4655x0x3
    背景 卸载一直使用的wps,并且重新安装后,电脑python3使用pywin32操作excel文件就报错:AttributeError:module‘win32com.gen_pyhasnoattribute‘CLSIDToClassMap‘报......
  • Why is git submodule not updated automatically on git checkout?
    Whyisgitsubmodulenotupdatedautomaticallyongitcheckout?WhenswitchingbrancheswithgitcheckoutIwouldassumethatmostofthetimeyouwouldwant......