gpt4 book ai didi

linux - 权限被拒绝(公钥、密码)。 rsync : connection unexpectedly closed - gitlab

转载 作者:行者123 更新时间:2023-12-04 18:48:25 25 4
gpt4 key购买 nike

我创建了一个 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


最好创建如下 key :
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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com