Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Panic on a repository cloned by ssh. #40

Open
doloopwhile opened this issue Oct 25, 2018 · 2 comments
Open

Panic on a repository cloned by ssh. #40

doloopwhile opened this issue Oct 25, 2018 · 2 comments

Comments

@doloopwhile
Copy link

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
@mpppk
Copy link
Owner

mpppk commented Oct 25, 2018

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. 😄

@mpppk
Copy link
Owner

mpppk commented Nov 17, 2018

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! 😃

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants