jorgebucaran / fisher

A plugin manager for Fish
https://git.io/fisher
MIT License
7.53k stars 257 forks source link

Add support for private repositories #707

Closed roele closed 2 years ago

roele commented 2 years ago

Currently plugin repositories require to be public. Using the the Download Repo Archive API it could be possible to add support for private repositories by supplying an authorization header as well. To pass in the token one could set a env variable while installing a plugin for example.

curl \
-f \
-L \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/OWNER/REPO/tarball/REF | tar -xzC ./tmp
roele commented 2 years ago

Looking through the code i just realised that the update use-case might be much harder to implement as it requires to maintain the token for the repository.

For my current use case i might just use a local checkout of the private repository.