gpt4 book ai didi

github - 如何为我的 Github 操作找到正确的入站规则以部署到我的 AWS EC2 服务器上?

转载 作者:行者123 更新时间:2023-12-05 03:50:06 25 4
gpt4 key购买 nike

我刚刚在我的项目上创建了操作并在那里配置了所有内容,但不幸的是我在“部署文件”部分收到了这样的消息> ssh:连接到主机 ec2-MYIP.us-east-2。 compute.amazonaws.com 端口 22:操作超时

Error due to EC2 security

好在我知道发生了什么。我必须允许以下入站规则:

类型:SSH/协议(protocol):TCP/发布范围:22/来源:::/0;

EC2 inbound rules to make it work

正如你在这里看到的,它在不限制源IP的情况下工作正常> When I don't specify any source for the TCP port 22

但显然出于安全原因我不想这样做,所以我需要找出我需要放在那里的源代码。我已经尝试了很多Github IP地址,但都没有成功。

这里有没有人知道它以 protected 方式工作的正确来源是什么,或者我怎样才能找到它?

我正在使用的操作> https://github.com/wlixcc/SFTP-Deploy-Action

最佳答案

此处记录了 GitHub 托管运行器的 IP 地址:https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#ip-addresses

Windows and Ubuntu runners are hosted in Azure and have the same IP address ranges as Azure Data centers.
[...]
Microsoft updates the Azure IP address ranges weekly in a JSON file that you can download from the Azure IP Ranges and Service Tags - Public Cloud website. You can use this range of IP addresses if you require an allow-list to prevent unauthorized access to your internal resources.

关于github - 如何为我的 Github 操作找到正确的入站规则以部署到我的 AWS EC2 服务器上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63642807/

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