gpt4 book ai didi

ssh - BitBucket 管道和 DigitalOcean 权限被拒绝

转载 作者:行者123 更新时间:2023-12-01 12:14:28 28 4
gpt4 key购买 nike

目前每次我运行管道时都会得到这个:Permission denied (publickey).

到目前为止的步骤:

在苹果机上:

  • cd ~/.ssh
  • ssh-keygen -t rsa -N '' -f my_ssh_key
  • base64 < my_ssh_key
  • ssh-copy-id -i my_ssh_key.pub root@xxx.xxx.xxx.xxx
  • cd/my/repo/路径
  • ssh-keyscan -t rsa server.domain.com > my_known_hosts

在 BitBucket 上

Repo >> Settings >> SSH Key >> Use my own

  • 将 base64 < my_ssh_key 的结果粘贴到 Private
  • 将 my_ssh_key.pub 粘贴到 Public 中。

运行管道

  • ssh root@xxx.xxx.xxx.xxx ls -l /var/www

Permission denied (publickey).

管道.yml

image: node:6.9.4

pipelines:
default:
- step:
caches:
- node
script:
- ssh root@xxx.xxx.xxx.xxx ls -l /var/www

最佳答案

将您的系统公共(public) SSH key 添加到 ~/.ssh/authorized_keys 告诉您的 Digital ocean droplet 授权您的本地机器获得访问权限。

您还需要在您的 Digital Ocean 帐户上添加您的 SSH key 。前往:

帐户 > 安全 > 添加 SSH key

关于ssh - BitBucket 管道和 DigitalOcean 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49305434/

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