我用自己电脑搭建好了git服务器,使用手机Termux和virtualbox中的kali_linux都可以git clone 。
认证使用的是密钥认证。
win10中有加入ssh-add 密钥,也添加密钥成功,但就是最后一步git clone 时提示权限不足。错误如下:
**
git clone git@xxx.xxx.xxx.xxx:stores/test.git**
Cloning into 'test'...
git@xxx.xxx.xxx.xxx: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
xxx.xxx.xxx.xxx是我自己主机ip。
还有一个问题是:git clone 能不能指定端口,网上的 git clone git://name@host:port/direcotory/test.git 是不能用的。