visual-studio-code - Google Cloud Engine 上的代码服务器(Visual Studio Code) - ERR_CONNECTION_REFUSED

标签 visual-studio-code google-cloud-platform

我想设置一个安装了 VSCode 的谷歌云引擎机器。
我遵循了这个安装:https://fireship.io/lessons/vscode-cloud-coder-tensorflow/
1. Ubuntu 20 LTS
2. wget https://github.com/codercom/code-server/releases/download/ {version}/code-server-{version}-linux-x64.tar.gz
3. tar -xvzf code-server-{version}-linux-x64.tar.gz
4. cd code-server-{version}-linux-x64
5. 须藤 ./code-server -p 80

输出是:
server-code call

防火墙规则是:
Firewall rules

当我浏览到 http://EXTERNAL_IP:80
ERR_CONNECTION_REFUSED

要确保端口在服务器端打开并可访问,缺少什么?

谢谢,
艾拉兰

最佳答案

我终于找到了适合我的方法。根据这里的回答:Error > Could not connect to Cloud Shell on port 8080 > While connecting the Visual Code using code-server
你需要在--host 0.0.0.0下运行code-server
$ PASSWORD=password PORT=8443 code-server --host 0.0.0.0

关于visual-studio-code - Google Cloud Engine 上的代码服务器(Visual Studio Code) - ERR_CONNECTION_REFUSED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61829412/

相关文章:

node.js - 启动 Node docker 容器以从 VS Code 进行调试

c++ - Mac VSCode 调试器总是显示关于 ';' 和 ':' 的错误

flutter - 无法在 vscode 终端中创建项目

ssh - 谷歌云 ssh 权限被拒绝 (publickey,gssapi-keyex,gssapi-with-mic)

c - 用于 GTK 开发的 VS Code C/C++ 配置

python - 进入 VSCode 中导入的标准模块

docker - 是否可以在 Google Kubernetes Engine 上拥有临时的磁盘 pod 存储?

python - 在 Google Cloud 函数中运行 gsutil 命令

google-cloud-platform - 在 Google Cloud Platform 中安排 Cloud DataStore 导出

go - 如何在 GKE 中使用 HTTPS 部署 Echo 应用程序?