Reputation: 13634
What am I doing wrong? I realize I havent read up on any user management but I'm completely local here and never created any users myself so why wouldnt it work?
pc@pc-desktop:~/Desktop$ ./fossil test-hash-passwords test-fossil
pc@pc-desktop:~/Desktop$ ./fossil server
Listening for HTTP requests on TCP port 8080
pc@pc-desktop:~/testcheckout$ ./fossil clone http://localhost:8080 bla
pc@pc-desktop:~/testcheckout$ ./fossil add .
current directory is not within an open checkout
pc@pc-desktop:~/testcheckout$ ./fossil open bla
pc@pc-desktop:~/testcheckout$ ./fossil add .
pc@pc-desktop:~/testcheckout$ ./fossil test-hash-passwords test-fossil
pc@pc-desktop:~/testcheckout$ ./fossil push
Push to http://localhost:8080
Round-trips: 1 Artifacts sent: 0 received: 0
Error: not authorized to write
Round-trips: 1 Artifacts sent: 0 received: 0
Push finished with 385 bytes sent, 303 bytes received
Upvotes: 6
Views: 2331
Reputation: 2855
See if the following works for you.
$ whoami
pc
$ fossil version
This is fossil version 1.34 [62dcb00e68] 2015-11-02 17:35:44 UTC
Clone the remote repository (the local username, pc
, has a namesake account on the remote repository).
$ fossil clone http://localhost:8080 bla.fossil
What's the remote repository URL for this clone?
$ fossil remote-url -R bla.fossil
http://localhost:8080
OK, let's specify the remote username; we'll use the same as the local username, $USER
:
$ fossil remote-url -R bla.fossil http://$USER@localhost:8080
password for bla:
remember password (Y/n)? y
Let's start working:
$ mkdir bla
$ cd bla
$ fossil open ../bla.fossil
In the end, commit to your local repository bla.fossil
. Finally, push to remote:
$ fossil push
Because remote-url
now has the username (and you memorized the password when prompted) it should work.
Upvotes: 2
Reputation: 163
[I can't comment, but...] You can also add the user credentials when cloning the repository:
fossil clone http://username:pass@URL:8080 repository_name
I'm the only one working on my projects so I set up auto-sync - whenever I commit I can commit local and send remote in one step [just fossil commit].
Upvotes: 5
Reputation: 11309
You are receiving that error because you do not have permissions to modify the remote repository. When you do not supply any credentials, your login name (pc
in this case) is used and the pc
user probably doesn't exist in the remote repository (or you'd have received a password prompt).
To make this work, you'll need to create an account on the remote repository and use those credentials while doing fossil push
.
Upvotes: 2