Panic on a repository cloned by ssh.
We uses SSH to checkout git reposity.
It dumps the following stacktrace (URL is replaced with dummy):
$ hlb browse
panic: unknown remote: ssh://[email protected]:3789/my-group/my-app.git
goroutine 1 [running]:
github.com/mpppk/hlb/etc.PanicIfErrorExist(0x1af55c0, 0xc420168a80)
/Users/yuki/src/github.com/mpppk/hlb/etc/utils.go:5 +0x4a
github.com/mpppk/hlb/cmd.glob..func22(0x1b45380, 0x1b6eef8, 0x0, 0x0)
/Users/yuki/src/github.com/mpppk/hlb/cmd/root.go:38 +0x1b9
github.com/mpppk/hlb/vendor/github.com/spf13/cobra.(*Command).execute(0x1b45380, 0x1b6eef8, 0x0, 0x0, 0x1b45380, 0x1b6eef8)
/Users/yuki/src/github.com/mpppk/hlb/vendor/github.com/spf13/cobra/command.go:682 +0x23c
github.com/mpppk/hlb/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1b47be0, 0x1b47e00, 0x17537e1, 0x1b47d20)
/Users/yuki/src/github.com/mpppk/hlb/vendor/github.com/spf13/cobra/command.go:783 +0x30e
github.com/mpppk/hlb/vendor/github.com/spf13/cobra.(*Command).Execute(0x1b47be0, 0x0, 0xc420151f48)
/Users/yuki/src/github.com/mpppk/hlb/vendor/github.com/spf13/cobra/command.go:736 +0x2b
github.com/mpppk/hlb/cmd.Execute()
/Users/yuki/src/github.com/mpppk/hlb/cmd/root.go:59 +0x31
main.main()
/Users/yuki/src/github.com/mpppk/hlb/main.go:6 +0x20
I guess it is possible to support ssh url.
For example, by adding to HTTP host/port to service configuration.
services:
- host: mydomain.m3.com
type: gitlab
protocol: ssh
port: 3789
http:
host: mydomain.m3.com
port: 443
oauth_token: XXXXXXXXXXXXX
Thank you for your report!
Currently, hlb does not support ssh because I've been using only http(s) protocol😅, but I'll start considering the implementation.
It is still under consideration too that how to extend the hlb configuration, but hlb browse may be able to support ssh without any configuration changes. :smile:
hlb v0.0.4 has been released, and the issue is solved by #42.
You can now use above git remote URL format for hlb browse with below hlb configuration. (any changes does not required!)
- host: mydomain.m3.com:3789
protocol: https # or http
type: gitlab
oauth_token: xxxxxxx
Please try the latest version and check whether it works fine! 😃