作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我创建了一个 gitlab
服务器。当我想部署时,我收到此错误消息:
$ eval $(ssh-agent -s)
Agent pid 258
$ mkdir -p ~/.ssh
$ echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_dsa
$ chmod 600 ~/.ssh/id_dsa
$ echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
$ rsync -azlh -e 'ssh -p 5432' $CI_PROJECT_DIR/ root@*.**.***.****:/var/www/html/****.com/public_html/
Warning: Permanently added '[*.***.**.***]:5432' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
我的服务器是 ubuntu。
最佳答案
如果您的 GitLab 服务器版本比 11.0(2018 年 6 月)更新,请记住 id_dsa
('dsa', not 'rsa') 在 "GitLab and SSH keys" documentation 中被标记为“已弃用” :
见“ Support for DSA SSH keys ”
Due to published weakness in the ssh-dsa algorithm, we’ll wind down support for DSA SSH keys.
In 11.0, the default value for the DSA SSH keys setting is “Are forbidden”. This setting is located in the visibility and access controls section of the Settings admin panel.This setting may be overridden if desired.
Beginning in 12.0, GitLab will always reject DSA SSH keys.Planned removal date: June 22, 2018
ssh-keygen -t ed25519 -C "<comment>"
# or
ssh-keygen -t rsa -b 2048 -C "<comment>"
关于linux - 权限被拒绝(公钥、密码)。 rsync : connection unexpectedly closed - gitlab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69870224/
我是一名优秀的程序员,十分优秀!