加载密钥“/dev/fd/63”时出错:libcrypto 中出现错误

问题描述 投票:0回答:2

我正在尝试将文件从管道推送到 GH 存储库,但失败于

ssh-add $private_key
/ ssh-add <(cat git-private-key | base64 --decode)

git config --global user.name "CI Bot"
git config --global user.email "localhost"
eval $(ssh-agent -s)
echo -e $private_key | base64 -w0 > git-private-key
ssh-add <(cat git-private-key | base64 --decode)

enter image description here

我尝试了其他解决方案和诸如

eval ssh-agent
update libcrypto
chmod 600 file permission
之类的东西,并以
plane and base64
格式传递密钥,但我遇到了同样的错误。

请尝试多种方式找到下面的ss enter image description here

ssh libcrypto
2个回答
0
投票

经过一些调试后,我通过更正

ssh-add
中引用它的方式来修复它。

我之前使用过 sed 更新过 $private_key

ssh-add

echo -e $private_key | sed 's/--- /---\n/g;s/ ----/\n----/g' | sed '2s/ /\n/g' > git-private-key

这可以确保 private_key 具有正确的格式 早些时候

----beginkey---- KEY SECRET DATA IN MULTIPLE LINES ----endkey----

sed 命令之后

----beginkey----
KEY SECRET DATA
----endkey----

0
投票

我遇到这个错误是因为我在gitlab中创建了

private_key
变量
protected
。因此,删除受保护的勾号后我可以继续

© www.soinside.com 2019 - 2024. All rights reserved.