在Linux上已经安装过git(自己搭建)了,本机(windows)想连接过去,通过git bash敲了下clone命令提示没权限:
- $ git clone git@111.11.111.11:code.git
- Cloning into 'code'...
- The authenticity of host '111.11.111.11 (111.11.111.11)' can't be established.
- ECDSA key fingerprint is SHA256:7jmL7Nrr9zJ7psJd3Zcfr4UckRNOMkgwK/ae9dsCgaw.
- Are you sure you want to continue connecting (yes/no)? yes
- Warning: Permanently added '111.11.111.11' (ECDSA) to the list of known hosts.
- git@111.11.111.11's password:
- Connection closed by 111.11.111.11 port 22
- fatal: Could not read from remote repository.
-
- Please make sure you have the correct access rights
- and the repository exists.
第一次连接失败很正常,毕竟没有设置账号信息,但第二次连接敲了自己刚设置的密码,竟然一直提示没权限