【发布时间】:2017-02-14 21:19:11
【问题描述】:
我正在使用此链接在 ubuntu 12.04 中安装 git-core、gitolite 和 gitweb:
https://ao2.it/wiki/How_to_setup_a_GIT_server_with_gitolite_and_gitweb
我使用这个命令安装了git-core:
sudo apt-get install git-core
然后我使用这个命令添加了一个新用户git:
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'git SCM user' \
--group \
--disabled-password \
--home /home/git \
git
然后我在/home/git 中添加了存储库
sudo -u git mkdir /home/git/repositories
然后我转移到 windows 机器,并使用此命令生成 pub 和 ppk 键:
ssh-keygen -t rsa
然后我将pub 密钥复制到ubuntu 并添加到/home/<username>/.ssh/ 文件夹中。
然后我在windowscmd中运行scp命令:
scp C:/Users/Ajay Kulkarni-enEXL/.ssh/id_rsa.pub 192.168.1.140:git.pub
git 是我之前在 Ubuntu 中创建的新用户名。
该命令的输出是:
You can't hack this system from external connectors like putty telnet etc.!!
Good luck with hacking this system cheers :)
Ajay Kulkarni-enEXL@192.168.1.140's password:
Permission denied, please try again.
Ajay Kulkarni-enEXL@192.168.1.140's password:
Permission denied, please try again.
Ajay Kulkarni-enEXL@192.168.1.140's password:
Permission denied (publickey,password).
lost connection
我得到了这个堆栈转储:
Exception: STATUS_ACCESS_VIOLATION at eip=61050C17
eax=00000000 ebx=616D16C8 ecx=0000000B edx=00000000 esi=0028E870 edi=002F0028
ebp=0028E708 esp=0028E6E0 program=C:\Program Files (x86)\OpenSSH\bin\ssh.exe, pid 6924, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028E708 61050C17 (616D16C8, 00000001, 0028E870, 00000001)
0028E768 610A341F (00000004, 00000001, 0028E870, 00000020)
0028E8B8 6108DF2F (0028ED10, 0028E8D0, 00000400, 00000002)
0028ECE8 00428777 (0028ED10, 00000000, 004104F5, 100E8C78)
0028EDB8 0041058A (0028EE20, 0000004F, 00000000, 0028EE34)
0028EDD8 0040FD53 (0028EE20, 100EF838, 0028EE20, 0041B469)
0028EE08 0041AA08 (00000000, 0028EE34, 0028EE20, 0040F7A4)
0028EE68 0040FBD8 (100E8C60, 100E8C78, 100E8C48, 004391B0)
0028F038 004023A0 (00000001, 616D2744, 100E00A8, 0028F090)
0028F078 61005F54 (0028F090, 00570056, 00590058, 007B005A)
0028FF58 6100616B (00000000, 00000000, 00000000, 00000000)
End of stack trace
scp 无法连接到 ubuntu 实例。如何让scp 连接到 ubuntu?
【问题讨论】:
-
谁投票决定结束这个问题?
标签: windows git ubuntu github ssh