Google Compute Engine VM,添加的负载均衡器现在无法 git 拉取

Google Compute Engine VM, Added Load Balancer now can't git pull

我有一个 google 计算引擎,我在上面设置了一个 git 存储库,一切都很顺利,我 git 实现了零问题。然后,我设置了一个负载均衡器并为我的虚拟机创建了一个 NEG,并且能够获得 https 运行ning。但是,现在当我 运行 git 拉它时,它什么也不做。它只是挂在那里没有输出,即使我使用 -v 它也没有输出并且无限期地挂起。我什至不知道负载均衡器和 https 设置是否相关,但我想不出其他任何东西。我已经尝试重新生成 SSH 密钥但没有效果。有什么想法吗?

这是我的 git 删除 -v 输出:

origin  git@github.com:LukasDeco/thoughtful.git (fetch)
origin  git@github.com:LukasDeco/thoughtful.git (push)

和git状态:

On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
        modified:   .gitignore
no changes added to commit (use "git add" and/or "git commit -a")

更新:

对于git fetch origin,这是我从超时得到的输出:

ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

然后我尝试使用 https,这是输出:

fatal: unable to access 'https://github.com/LukasDeco/thoughtful.git/': Failed to connect to github.com port 443: Connection timed out

这似乎是网络问题,但我的 VM 上有 default-allow-ssh 防火墙规则,因此应该打开端口 22。

John Hanley in the comments, and detailed in "Compue Engines / Securely connecting to VM instances / Traffic egress using NAT gateways 所述

When an instance does not have an external IP address assigned it cannot make direct connections to external services, including other Google Cloud services.

To allow these instances to reach services on the public internet, you can set up and configure a NAT gateway machine, which can route traffic on behalf of any instance on the network

Cloud NAT is a distributed, software-defined managed service.
It's not based on proxy VMs or appliances.

Cloud NAT configures the Andromeda software that powers your VPC network so that it also provides source network address translation (SNAT) for VMs without external IP addresses.
Cloud NAT also provides destination network address translation (DNAT) for established inbound response packets.