[GH-ISSUE #51] yaml: line 1: did not find expected key #27

Closed
opened 2026-05-05 10:57:26 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @xtrsyz on GitHub (Nov 22, 2017).
Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/51

configuration error: failed to parse file ".tunnel/tunnel.yml": yaml: line 1: did not find expected key
with config
server_addr: "185.2.2.137:4443"
insecure_skip_verify: true
tunnels: ...

./tunnel -version
3d03804

Originally created by @xtrsyz on GitHub (Nov 22, 2017). Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/51 configuration error: failed to parse file ".tunnel/tunnel.yml": yaml: line 1: did not find expected key with config server_addr: "185.2.2.137:4443" insecure_skip_verify: true tunnels: ... ./tunnel -version 3d03804
Author
Owner

@mmatczuk commented on GitHub (Nov 22, 2017):

I think your file is broken. It should be like.

server_addr: 185.2.2.137:4443
insecure_skip_verify: true
tunnels:
  webui:
    proto: http
    addr: localhost:8080
    auth: user:password
    host: webui.my-tunnel-host.com
  ssh:
    proto: tcp
    addr: 192.168.0.5:22
    remote_addr: 0.0.0.0:22
<!-- gh-comment-id:346280909 --> @mmatczuk commented on GitHub (Nov 22, 2017): I think your file is broken. It should be like. ```yaml server_addr: 185.2.2.137:4443 insecure_skip_verify: true tunnels: webui: proto: http addr: localhost:8080 auth: user:password host: webui.my-tunnel-host.com ssh: proto: tcp addr: 192.168.0.5:22 remote_addr: 0.0.0.0:22 ```
Author
Owner

@xtrsyz commented on GitHub (Nov 22, 2017):

yaml: line 1: mapping values are not allowed in this context
if i not use "quote"

<!-- gh-comment-id:346293212 --> @xtrsyz commented on GitHub (Nov 22, 2017): yaml: line 1: mapping values are not allowed in this context if i not use "quote"
Author
Owner

@mmatczuk commented on GitHub (Nov 22, 2017):

@xtrsyz please provide more context.
What platform.
What config file.
What do you mean by if i not use "quote".

<!-- gh-comment-id:346294563 --> @mmatczuk commented on GitHub (Nov 22, 2017): @xtrsyz please provide more context. What platform. What config file. What do you mean by if i not use "quote".
Author
Owner

@xtrsyz commented on GitHub (Nov 22, 2017):

server_addr: "185.2.2.137:4443" error yaml: line 1: did not find expected key
server_addr: 185.2.2.137:4443 error yaml: line 1: mapping values are not allowed in this context

centos 6 tunnel_linux_amd64.tar.gz
raspberry pi 3 tunnel_linux_arm.tar.gz
both same error

this file config
server_addr: "185.2.2.137:4443"
insecure_skip_verify: true
tunnels:
webui:
proto: http
addr: "localhost:2020"
host: tunnel.khus.us

<!-- gh-comment-id:346296262 --> @xtrsyz commented on GitHub (Nov 22, 2017): server_addr: "185.2.2.137:4443" error yaml: line 1: did not find expected key server_addr: 185.2.2.137:4443 error yaml: line 1: mapping values are not allowed in this context centos 6 tunnel_linux_amd64.tar.gz raspberry pi 3 tunnel_linux_arm.tar.gz both same error this file config server_addr: "185.2.2.137:4443" insecure_skip_verify: true tunnels: webui: proto: http addr: "localhost:2020" host: tunnel.khus.us
Author
Owner

@mmatczuk commented on GitHub (Nov 22, 2017):

As I said your file is broken. The indents matter try using the file exactly as in the example above or use http://www.yamllint.com/.

<!-- gh-comment-id:346300522 --> @mmatczuk commented on GitHub (Nov 22, 2017): As I said your file is broken. The indents matter try using the file exactly as in the example above or use http://www.yamllint.com/.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/go-http-tunnel#27
No description provided.