Closed ghost closed 3 years ago
从匿名上传的错误报告来看,你应该是如下原因:
没有在 Git 仓库那端添加 hpr 的 ssh-key,请按照快手上手 教程从 container 复制 SSH PUBLIC KEY 下面两行井号中间的公钥添加到你的 gitlab 上面
git '--git-dir=/app/repositories/github/icyleaf-hpr' '-c' 'color.ui=false' push '--mirror' 'hpr' 2>&1:Permission denied, please try again.
Permission denied, please try again.
Connection closed by 115.***.***.178 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
知道原因了。gitlab是跑在docker上的,https和ssh端口都经过映射,不是原始443和22了。是不是搞成ssh端口可配的?
hpr 使用 docker 启动的时候配置 -e HPR_SSH_HOST=10.10.10.221 -e HPR_SSH_PORT=2233
把上面 host 改成域名或ip,port改成对应的 ssh 端口号 。具体参考:https://hpr.ews.im/#/examples?id=自建-gitlab-服务
ssh IP和端口加上去,不过还是创建失败 我是用docker-compose启动的服务 有本地log可以看吗? ===============info================== hpr: container_name: hpr image: icyleafcn/hpr network_mode: host ports:
git '--git-dir=/app/repositories/github/icyleaf-hpr' '-c' 'color.ui=false' push '--mirror' 'hpr' 2>&1:Warning: Permanently added the RSA host key for IP address '115.xxx.xxx.209' to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
Connection closed by 115.xxx.xxx.209 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这个日志你看下 sidekiq.log
之前的hpr未自定义ssh端口,生成的RSA证书好像一直会连原始的22 我删除了原hpr容器,重新up了hpr,GITLAB里也重新添加rsa密钥密钥,不过报Host key verification failed了 在hpr的容器里手工连了一下gitlab的ssh,有点怀疑是gitlab的sshd启用了ECDSA而不是RSA? ===================side log==================== git '--git-dir=/app/repositories/github/icyleaf-hpr' '-c' 'color.ui=false' push '--mirror' 'hpr' 2>&1:Host key verification failed. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
==================容器里手工ssh======================= ssh ssh://192.168.1.10:10022 Warning: Permanently added '[192.168.1.10]:10022' (ECDSA) to the list of known hosts. root@192.168.1.10: Permission denied (publickey).
==================/app/.ssh/known_hosts======================= .ssh/known_hosts [192.168.1.10]:10022 ecdsa-sha2-nistp256 AAAAE2Vj....................
那你重新生成一个 ECDSA 试试?
长时间没有回应,暂时已关闭
创建了两次,info先显示busy,后来查询都是failed 不断刷新gitlab,group里短暂出现过该创建的仓库,但是是空的,随后消失。 请问怎么找log看哪里出了问题? ps:新年好
以下是API调用应答: curl -X POST http://192.168.1.2:8848/repositories -d "url=https://github.com/icyleaf/hpr.git&clone=true" {"job_id":"e14ac6406662e99447217fc4"}
curl -X GET http://192.168.1.2:8848/info {"hpr":{"version":"0.14.0"},"jobs":{"processed":4,"failed":2,"busy":0,"processes":1,"enqueued":0,"scheduled":0,"retries":0,"dead":0,"default_latency":0}}
以下是docker log docker container logs hpr
192.168.1.172 - - [08/Feb/2021:01:25:03 +0000] "POST /repositories HTTP/1.1" 201 37 1.9263 192.168.1.172 - - [08/Feb/2021:01:25:35 +0000] "GET /info HTTP/1.1" 200 153 0.0011 192.168.1.172 - - [08/Feb/2021:01:26:53 +0000] "GET /info HTTP/1.1" 200 153 0.0009 192.168.1.172 - - [08/Feb/2021:01:26:55 +0000] "GET /info HTTP/1.1" 200 153 0.0010 192.168.1.172 - - [08/Feb/2021:01:27:03 +0000] "POST /repositories HTTP/1.1" 201 37 0.3423 192.168.1.172 - - [08/Feb/2021:01:27:07 +0000] "GET /info HTTP/1.1" 200 153 0.0009