SebastianM
SebastianM

Reputation: 45

How to push Fossil local repository to remote hosting

It would be great if you could help me with one thing.

I'm using Fossil as my version manager. Using this on my PC is not a problem but when I try to push it to remote repository I can't.

Here's the thing:

When inside folder with my repository I type

fossil push https://chiselapp.com/user/sebatbg/repository/nres

I get info that: Error: Wrong project

When I type

fossil push https://[email protected]/user/sebatbg/repository/nres

It asks for my password but when I enter it fossil says that Login failed I tried both my pass to chisel app and for specific repository but result is the same.

Could anyone tell me step by step how to do the push?

Thank you

Upvotes: 4

Views: 1701

Answers (4)

Rainer Glaschick
Rainer Glaschick

Reputation: 21

To clone a repo to a remote machine that has no access to the source machine, my recipe is:

  • clone locally into a temporary location with the '--no-open' option
  • send this file to a temporary location on the remote machine
  • login to the remote machin
  • clone the copy of the temporary clone to the final destination, again with '--no-open'
  • remove the two temporaries

See more details in a slightly longer text I just added to the FOSSIL forum: https://fossil-scm.org/forum/forumpost/4e51f8f957

Upvotes: 0

Paul Higham
Paul Higham

Reputation: 11

If you have an existing local repository that you would like to upload to the chiselapp hosting service, the process can be a bit awkward. If your repository is smaller than 8M, chiselapp provides a command Upload repository that may suit your purposes. Otherwise, this is what you need to do:

  1. Navigate to a source tree for the local repository.
  2. Issue the fossil info command and copy the project-code of the local repository. This is a SHA1 hash.
  3. Log in to chiselapp.com website and click on the Create Repository link in the header of the home page.
  4. Paste the previously copied project-code into the Override Project Code field of the resulting form.
  5. Fill the remaining fields as appropriate and click the Create Repository button at the bottom of the page.
  6. Record the password that is then assigned to you.
  7. Navigate to the chiselapp dashboard and click on the name of the newly created repository. This should bring you to the fossil web interface of this repository.
  8. Login to the new repository using your local username and the recorded password. This should be the only user so far and should have setup user permissions.
  9. Navigate to the Admin/Stats page and check that the Project ID of the new remote repository matches the project-code of the local repository.
  10. Back in the local repository's source tree issue the command

    fossil push https://<username>:<recorded-password>@chiselapp.com/user/<username>/repository/<repository-name> -R <local-repository-file>
    

Upvotes: 1

Bernhard
Bernhard

Reputation: 705

I had a similar problem. I had cloned a remote repository, but could not push to it. I could solve it by adding the username to the remote url

remote-url https://{username}@chiselapp.com/user/{chiselab-user}/repository/{repository-name}

you are then prompted for the password of the remote repository.

Upvotes: 3

Martijn
Martijn

Reputation: 13632

Fossil assigns a unique ID, called the "project ID", to each new repository. The error message "Wrong project" means that you've got different repositories locally and remotely, that their project-IDs don't match.

The only way I know to publish an existing local repository on Chisel is to upload said repository, and then set the remote-url of your local repository to the Chisel URL, either explicitly or by pulling from the URL.

Upvotes: 2

Related Questions