title:Gidder-Android 手机随身 Git 服务器
date: '2018-10-27 09:38:40'
updated: '2018-10-27 13:30:38'
tags: [Gidder,Android,ssh,ssh-dss,ssh_config]
1remote: Total 50 (delta 1), reused 50 (delta 1)R (36/50)
2
3Receiving objects: 100% (50/50), 26.64 KiB | 2.22 MiB/s, done.
4
5
6Resolving deltas: 100% (1/1), done.
Win10 解决。
1MyMacBook:git demo1984s$ git clone ssh://demo1984s@m.hp-shell.git:2222/hp-shell.git
2Cloning into 'hp-shell'...
3Unable to negotiate with 192.168.0.156 port 2222: no matching host key type found. Their offer: ssh-dss
4fatal: Could not read from remote repository.
5
6Please make sure you have the correct access rights
7and the repository exists.
同 Win10,修改 ~/.ssh/config 文件(如果不存在则新建一个)
1Host m.hp-shell.git
2
3HostKeyAlgorithms +ssh-dss
再次执行 Git clone,发现新的报错信息如下:
1MyMacBook:git demo1984s$ git clone ssh://demo1984s@m.hp-shell.git:2222/hp-shell.git
2
3Cloning into 'hp-shell'...
4
5Unable to negotiate with 192.168.0.156 port 2222: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc
6
7fatal: Could not read from remote repository.
8
9Please make sure you have the correct access rights
10
11and the repository exists.
同样的网上看了很多解决方案,最终在 /etc/ssh/ssh_config 新增一行解决:
1sudo vi /etc/ssh/ssh_config
2
3Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
再次执行:
1clone:git clone ssh://demo1984s@m.hp-shell.git:2222/hp-shell.git
2
3Cloning into 'hp-shell'...
4The authenticity of host '[m.hp-shell.git]:2222 ([192.168.0.156]:2222)' can't be established.
5DSA key fingerprint is SHA256:IeQlLoT84XtZ/ZfdkKNbqu13exRxdWZVAhnATTZcArc.
6Are you sure you want to continue connecting (yes/no)? yes
7Warning: Permanently added '[m.hp-shell.git]:2222,[192.168.0.156]:2222' (DSA) to the list of known hosts.
8demo1984s@m.hp-shell.git's password:
9warning: You appear to have cloned an empty repository.
终于搞定。