Fossil Forum

Opening a remote fossil
Login

Opening a remote fossil

Opening a remote fossil

(1) By smd (scottdoctor) on 2023-11-27 19:23:03 [link] [source]

I have on my VPS several fossil repositories for different projects. I can access them with my browser and use the various UI operations without any issues. Up until now, the repository was just so others on the team can access the code and see what was changed.

The problem is that from the command line (Windows 10) I cannot access the repository. I created an empty folder for test purposes. Tried to open the repository using the following command:

fossil open myusername:mypassword@https://mywebsite.net/code/myrepo

(I changed the names for this post)

I get the following error:

repository does not exist or is in an unreadable directory:

However, I can paste https://mywebsite.net/code/myrepo into my browser and the repo UI opens normally.

I checked the permissions of the folder and the repo my VPS. They are set to 666.

What am I missing or doing wrong?

(2) By anonymous on 2023-11-27 19:31:22 in reply to 1 [link] [source]

https://fossil-scm.org/home/help/open doesn't show all the details, but does link to "clone" at https://fossil-scm.org/home/help?cmd=clone which includes:

http[s]://[userid[:password]@]host[:port][/path]

So try putting the user:pass part there, instead of where you showed it, and it may have better luck.

Cheers,

(3) By Preben Guldberg (preben) on 2023-11-27 20:19:40 in reply to 1 [link] [source]

fossil open myusername:mypassword@https://mywebsite.net/code/myrepo

Is this, besides obvious user:passwd obfuscation, the syntax you used?

It should be https://user:passwd@host/path/to/repo.

(4) By smd (scottdoctor) on 2023-11-27 20:34:51 in reply to 3 [link] [source]

That was the issue. I moved the name:password to after the slashes and the repo opened normally.

Another question:

Currently for a new repo, I create the repo locally in the project folder, set up various settings, commit, close, then use filezilla to copy the repo into the folder on my VPS. My question is whether it is possible to create a repo directly onto the VPS, or do I have to create it first then copy it over?

(5) By Warren Young (wyoung) on 2023-11-28 05:19:06 in reply to 4 [source]

If you have a copy of Fossil on the VPS, then the answer is simply to run "fossil init" there. At that point, you can stand the new instance up in any of several ways, then log in over HTTP[S] with the generated login credentials printed by the init command.

(6) By Preben Guldberg (preben) on 2023-11-28 07:13:02 in reply to 5 [link] [source]

That's what I would do for a new project, too.

Any easy way to do this if you have a repository that started locally, e.g. to start sharing it for collaboration?

From memory, I usually wind up doing a local fossil clone current.fossil clone.fossil, forget to run fossil remote off -R clone.fossil and then copy clone.fossil to the remote host.

(7) By Preben Guldberg (preben) on 2023-11-28 07:19:39 in reply to 5 [link] [source]

That's what I would do for a new project, too.

Any easy way to do this if you have a repository that started locally, e.g. to start sharing it for collaboration?

From memory, I usually wind up running through something like

  1. fossil clone current.fossil clone.fossil
  2. fossil remote off -R clone.fossil
  3. scp clone.fossil remote:path

Mostly, though, I have forgotten the second step, which may lead to errors if you also work on the remote host (e.g. fossil open will fail as it tries to sync with a local path that does not make sense after the move to another host).