Fisher: Feature request: install from Gitlab

Created on 27 Sep 2016  路  13Comments  路  Source: jorgebucaran/fisher

Proposed syntax fisher gitlab:Rush/foo

enhancement

Most helpful comment

Hey @jbucaran while we are at it might as well do bitbucket to if it isn't already.

All 13 comments

Sure. We can do that.

Hey @jbucaran while we are at it might as well do bitbucket to if it isn't already.

or any git server. I'd love to be able to use fisherman with my 'gogs' install.

@pkpowell For WIW, this feature request is to expand gitlab:Rush/foo to https://gitlab.com/Rush/foo.git.

In the case of a custom gogs server, you just need to use the full URL, so I believe you can already use fisherman with your gogs install.

Ah, sorry about that.
I did try using the full URL and got

fisher [email protected]:phil/fish_settings.git
Installing 1 plugin/s
! Fetch gogs github.com/fisherman/gogs (mini.local:phil/fish_settings)
! There was an error installing gogs or more plugin/s.
Try using a namespace before the plugin name: owner/gogs

http:// gives a similar error

fisher http://mini.local:3210/phil/fish_settings.git
Installing 1 plugin/s
! Fetch fish_settings github.com/http://mini.local:3210/phil/fish_settings
! There was an error installing fish_settings or more plugin/s.
Try using a namespace before the plugin name: owner/fish_settings

It looks like github.com/is hardcoded.
This is on fisherman version 2.10.0 ~/.config/fish/functions/fisher.fish

@pkpowell Ouch! 馃槄

It looks like github.com/is hardcoded.

Yes, kind of. Fisherman thinks this is _not_ an URL, so it adds github.com/ to it.

[email protected]:phil/fish_settings.git

Is not a URL pattern fisherman knows yet. You should be able to get away with an http/s like URL for the moment.

So I stuck case http://\* into the switch statement around line 557, and the URL now looks fine (no github insert), but I still get the same error:

fisher http://mini.local:3210/phil/fish_settings.git
Installing 1 plugin/s?
! Fetch fish_settings http://mini.local:3210/phil/fish_settings
! There was an error installing fish_settings or more plugin/s.
Try using a namespace before the plugin name: owner/fish_settings

My git server requires authentication, so I tried adding my auth to the URL http://name:[email protected]:3210/phil/fish_settings.git but that was interpreted as an URL.
Is there a proper way to send authorisation?

@pkpowell I will look into why using your auth in the URL fails when 2.11 is ready.

For GitHub we got:

set -x GITHUB_USER your_username
set -x GITHUB_TOKEN your_github_api_token_for_fisherman

but that does not help you I know.

Out of curiosity, have you tried installing a plugin from one of your servers that does not require auth?

yep, that worked!
Weirdly it now seems that all my repos are open (no biggie as the server's not publically accessible) - will pass that on to the gogs people.
Any chance case http://\* will make it's way into the repo so it's still there after I update?
Cheers & thanks

@pkpowell Right, we don't check for case http://\*, but we could, no probs.

awesome! thanks

@Rush Decided on gitlab.com/Rush/foo or bitbucket.org/Rush/foo for ease of implementation.

Should add it to the readme because it works but it's not obvious!

Was this page helpful?
0 / 5 - 0 ratings