我有这个 bitbucket 管道:图像:ubuntu:latestpipelines:分支:master:-步骤:名称:上传脚本:-apt-get update && apt-get insta...
我有这个 bitbucket 管道:
image: ubuntu:latest
pipelines:
branches:
master:
- step:
name: Upload
script:
- apt-get update && apt-get install -y openssh-client jq curl
- cat /opt/atlassian/pipelines/agent/ssh/id_rsa >> ec2_private_key.pem
- chmod 600 ec2_private_key.pem
- echo "Fetching modified files from Bitbucket API using diff endpoint"
- |
curl -s -H "Authorization: Bearer $API_TOKEN_BEARER" \
"https://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO_FULL_NAME/commits/master" \
| jq -r '.values[0].hash' > latest_commit.txt
- COMMIT_HASH=$(cat latest_commit.txt)
- |
curl -s -H "Authorization: Bearer $API_TOKEN_BEARER" \
"https://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO_FULL_NAME/diff/$COMMIT_HASH" \
| grep '^+++ b' | awk '{print $2}' | sed 's/^b\///' > modified_files.txt
- echo "Modified files:"
- cat modified_files.txt
- while IFS= read -r file; do
scp -i ec2_private_key.pem -o StrictHostKeyChecking=no -r "$file" ubuntu@$EC2_HOST:$PATH"$file";
done < modified_files.txt
- ssh -i ec2_private_key.pem -o StrictHostKeyChecking=no ubuntu@$EC2_HOST "cd $PATH && sudo docker-compose up --build -d"
这与我在另一个存储库中拥有的另一个管道非常相似,并且已经可以正常工作。但是,执行管道时似乎未正确安装映像。在构建设置中,我收到此错误:
使用的图像:构建:docker.io/library/ubuntu@sha256:bash:dircolors:未找到命令
在 apt-get 行中我收到此错误:
- apt-get update && apt-get install -y openssh-client jq curlbash:apt-get:未找到命令
我正在尝试使用命令 certbot --apache 颁发证书,但它给出了此错误 certbot --apache 将调试日志保存到 /var/log/letsencrypt/letsencrypt.log 您想要哪些名称...
我正在尝试使用该命令颁发证书 certbot --apache
,但它给出了此错误
certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Which names would you like to activate HTTPS for?
1: leak.citizensec.kz
2: www.leak.citizensec.kz
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for leak.citizensec.kz
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: leak.citizensec.kz
Type: dns
Detail: DNS problem: NXDOMAIN looking up A for leak.citizensec.kz - check that a DNS record exists for this domain; DNS problem: NXDOMAIN looking up AAAA for leak.citizensec.kz - check that a DNS record exists for this domain
Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
我的 IP 已在 DNS 管理器中添加到此域
在此处输入图片描述
从 DNS 管理器中删除 DNS 条目
在此之前,该网站在 HTTPS 上运行,但当证书过期时,我尝试颁发一个新证书,然后出现此错误