Experimental GitHub Release Assets as FUSE filesystem mount.
This set-up only works for Linux and MacOS, since Windows does not support the concept of FUSE.
Assuming that ghafs executable has already been built, the actual usage help
looks like this:
ghafs [--token TOKEN] [--allow-other] MOUNTPOINT OWNER REPONote that you should not need root privileges for the above command as long as
the mountpoint is a user mountable directory.
A proper example looks something like this:
mkdir -p /tmp/tera-cli
./ghafs /tmp/tera-cli guangie88 tera-cliNote that you should try to provide the GitHub access token so that you have a
much higher rate limit for GitHub API even for public repos. Also if you wish
for another user (e.g. root) to see the mounted directory, you will need to
specify the --allow-other flag.
Assuming you have successfully mounted after following the above given command,
you should then be able to traverse into /tmp/tera-cli to look at the various
release tags and assets with another terminal / file browser.
To unmount, currently one has to do the following:
- Press
CTRL-Con the runningghafsto terminate the application - Make sure no other terminal / application is running at the mountpoint
- If you are on Linux, you can run this to umount:
fusermount -u /tmp/tera-cli. For MacOS, runumount /tmp/tera-cliinstead, which may or may not requiresudo(not tested).
You will need go of version 1.12 or higher for Go module support.
Simply run
go build -v ./...This will generate the ghafs executable.
If you prefer a fully statically linked executable that can be deployed
anywhere, run with CGO_ENABLED=0 env var disabled instead, like the following:
CGO_ENABLED=0 go build -v ./...To check that it is indeed fully statically linked, run
ldd ghafsAnd make sure it reads along the line of "not a dynamic executable".