无法确定默认配置路径 cloudflared Linux中没有文件[config.yml config.yaml]

问题描述

我正在尝试使Argo隧道正常工作,并且在本地主机测试阶段遇到了配置文件config.yml config.yam的问题。

changerz_critical@cloudshell:~ (global-road-289110)$ /usr/local/bin/cloudflared --origincert /etc/cloudflared/cert.pem --no-autoupdate
INFO[2020-09-15T15:00:59Z] Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflare
d]
INFO[2020-09-15T15:00:59Z] Version 2020.9.0
INFO[2020-09-15T15:00:59Z] GOOS: linux,GOVersion: go1.14.7,GoArch: amd64

我尝试了$ cloudflared tunnel --config tunnels/config.yml次,但是没有使用(后来我尝试将config.yml放在所有文件夹中,但是Cloud Shell找不到它。请让我知道有什么用我要解决问题吗?

非常感谢您的帮助!

解决方法

您需要在url之前添加--url,如下所示:

cloudflared隧道--hostname {fule主机名} --url http:// localhost:8000