OK users, I'm stuck :)

I created a local repository and it's working fine. I wanted to setup a server to push this to (LAN only at the moment, one step at a time right? :) ). To do this I:

1. Installed fossil on another machine
2. scp'd the local .fossil file to an empty directory on the server
3. executed `fossil push http://server:port/repository` on the client

What I get back is "Error: not authorized to write".

I'm not sure if this is unix/fossil/other permissions or...?

@jjg I think you have to log into the remote #fossil and grant permissions for your other user.
@jjg A little of both. I've been too busy at work the last 2-3 years to do anything where I'd use Fossil, but I hope that changes soon.

@lnxw48a1 ...or maybe a better question is: What is the *right* way to initialize a repository on the server 😂

@lnxw48a1 I hadn't seen this page, thanks for the tip, I'll give it a run!

@lnxw48a1 after reading this I thought maybe if I cloned the repo from the server it might work, but no dice.

It's weird, I can log-in to the web UI, I've granted my user all the privledges, but still can't push....🤔


@jjg How are you running Fossil on the server? As a daemon? CGI? SCGI?

@drwho stand-alone. Right now I’m just testing it on the LAN until I know what I’m doing (trying to keep it as simple as possible :) )

@jjg Okay. On the server, as the user the Fossil daemon will run as, did you run the command `fossil server <name of repo>`?

Do you have port 8080/tcp open and accessible? That's what Fossil-as-daemon tries to grab by default.


I ran `fossil server /path/to/directory/where/repos/live` :)

I can talk to it, I just get that error. Here's the full response:

Round-trips: 1 Artifacts sent: 0 received: 0
Error: not authorized to write
Round-trips: 1 Artifacts sent: 0 received: 0
Push done, sent: 514 received: 303 ip:

@jjg Hmmm... check the directory permissions all the way down to /.

Are you running the server under the account that owns the repo store?

@drwho Yeah, I'm running `fossil` as the user who has rw permissions on the directory and the repository file.



I think maybe I'm not passing auth info when I try to push to the repo, but I can't figure out how to do that other than during the initial clone... 🤣



OK I got this working.

If I specify the username in the URL when cloning the repository, fossil prompts for the password and then subsequent push/sync/etc. works.

Workflow-wise I guess this means I should init new repositories on the server, and make sure I clone them correctly.

This is kind of annoying after using the Github/Gitlab flow of making a repository locally and then pushing it when you're ready, but I can live with it.

@jjg If nothing else, it makes it easier to automate some parts of the provisioning process.

@jjg I don't know either things, so total swag principle here,but I'd first look at the user that owns the fossil process and the perms on the dir.


That's always a good place to start :)

I figured it out eventually, essentially I wasn't passing the credentials along to the server, but it wasn't obvious that this was the problem, nor was it obvious how to remedy it.

So I started over and specified the credentials as part of the URL when I cloned the repository and that seemed to do the trick.

@jjg I've just burned myself so often with the same problem over the years...

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!