jackc / jackc/tern

ssh-tunnel port not being respected from config

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.3k
Forks
86
PR merge metrics
No merged PRs in 30d

Description

Config
```
[database]
host = localhost
port = 5432
database = postgres
user = postgres

[ssh-tunnel]
host = localhost
port = 2222
user = vagrant
```

```bash
tern migrate
Unable to connect to PostgreSQL:
dial tcp 127.0.0.1:22: connect: connection refused
```

Would expect to see `127.0.0.1:2222` if the port was being used from the config. Using Mac if it matters.

```
tern version
tern v2.1.1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `tern migrate` entry point and reproduce the configuration shown in the issue. Trace how the `[ssh-tunnel]` port is read and verify that the connection target uses 2222 rather than 22. Done means the command connects to `127.0.0.1:2222` when that configuration is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.