Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the CLI invocation for HUBFS instead of NET USE? #8

Open
lonnietc opened this issue Dec 23, 2022 · 4 comments
Open

What is the CLI invocation for HUBFS instead of NET USE? #8

lonnietc opened this issue Dec 23, 2022 · 4 comments

Comments

@lonnietc
Copy link

Hello @billziss-gh ,

As an initial test, I installed the "HUBFS 2022 Beta1" (hubfs-win-1.0.22067.msi) and was able to connect to my Github Repo as it shows.

For a second step, I have been able to compile HUBFS in my MSYS2/Mingw x64 to produce the hubfs.exe file.

Now I would like to start up the hubfs.exe in a command prompt with the proper steps to connect to my repo again instead of using the "net use H: ..." command this time to validate that the build was successful.

Can you please show me the CLI options needed to make this work?

Basically, I would like to know what the CLI options that are being used when done with "net use".

Thanks

@billziss-gh
Copy link
Collaborator

Running HUBFS from the command line will print the available options. The command line that net use is described here.

@lonnietc
Copy link
Author

I looked at the command line settings from there and have been able to ascertain that the step one is to:

1.) First get the token from Github.com

test-hubfs> .\hubfs.exe -auth=force -authkey=https://github.com -authonly
First, copy your one-time code: 055D-A85C
Then press [Enter] to continue in the web browser...

When you press [Enter] then you put the token in for authorization.

NOTE: After this completes, I noticed that the drive is still not present at this stage.

I am working on step 2, now to see what I need to bring up the drive and hold it active from the CLI (i.e. hubfs.exe directly)

In General the command is:

2.) Start hubfs.exe and connect to the Github Repository.

test-hubfs> .\hubfs -auth optional -o VolumePrefix=%\/_1 -o uid=-1,rellinks,FileInfoTimeout=-1 %\/b/_1 %2

But I need to figure out the %1 and %2 variables.

I assume that one of them is the mount "H:' (in the example) and the other is the Github repo string, but not sure yet.

EXPECT: I would think that the 2nd Step above will start and mount the H: and connect to the Github Repository desired.

3.) Go to the File explorer or in another command window.

???

But making progress none the less.
Thanks

@lonnietc
Copy link
Author

lonnietc commented Dec 23, 2022

I figured it out for Step 2.

test-hubfs> .\hubfs -auth optional -o uid=-1,rellinks,FileInfoTimeout=-1 github.com/[orginization]/[repo] H:

Where (from your example image):

[organization] --- billziss-gh
[repo] --- winfsp

Not really clear what the VolumePrefix option is used for:

VolumePrefix=%\/_1

QUESTION: Where to get a list of all of the "optional -o" possibilities?

In any case, things seemed to work so far.

@lonnietc
Copy link
Author

Quick question:

Can you please explain how the union filesystem part works in HUBFS since I am greatly interested in how it unions different directories?

Can HUBFS union multiple repositories and/organizations into an unified directory space under the mounted filesystem?

Thanks in advance

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

No branches or pull requests

2 participants