The Wayback Machine - https://web.archive.org/web/20201231101715/https://github.com/TheLocehiliosan/yadm/issues/169
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

Website Getting Started page could be clearer, and actually doesn't work #169

Open
jwatt opened this issue Oct 30, 2019 · 2 comments
Open

Website Getting Started page could be clearer, and actually doesn't work #169

jwatt opened this issue Oct 30, 2019 · 2 comments

Comments

@jwatt
Copy link

@jwatt jwatt commented Oct 30, 2019

The Getting Started page says:

Eventually you will want to push the local repo to a remote.

yadm remote add origin <url>
yadm push -u origin master

It wasn't clear to me whether to expect the yadm wrapper to be smart enough to exclude the internal repo path from <url> or not. It turns out it is not. Perhaps it would be clearer to use <user@host:.yadm/repo.git> rather than the ambiguous <url>.

Even after doing that, it turned out that the yadm push command fails since it is rejected.

I should say first that since the text under discussion belongs to the "If you don’t currently have a repository" section, I assumed it to be reasonable to simply initialize the machine I was pushing to with yadm init (although the docs don't specify to do this, in seems necessary since yadm appears to set permissions etc. and so a clone from the local machine to the remote without an init on the remote first wouldn't do the right thing).

With that done, the push was rejected. I though maybe running yadm config receive.denyCurrentBranch warn on the remote machine would work to fix it, but that appears to be silently dropped. Instead I had to run git directly via (cd .yadm/repo.git && git config receive.denyCurrentBranch warn). That done, pushing from the local machine then worked.

@TheLocehiliosan
Copy link
Owner

@TheLocehiliosan TheLocehiliosan commented Oct 30, 2019

This is the first I’ve had this reported as confusing. And I will look to see if it can be clarified. However, URL should be the value of a git remote. For example, a Github, Bitbucket, or Gitlab URL. Or users that want to host their own repo would have another git:// or file:// url of a bare repo they have created.

yadm is a client for interacting with a remote repo, but if you want to generate a remote repo, you need to use git or one of the many git repo hosting sites on the internet.

The local repo used by yadm isn’t suitable to receive updates because it has a work-tree defined (similar to most git repos anyone clones). If you want a repo to push to locally it will need to be created with git init --bare.

Does this information help clear up some confusion?

@TheLocehiliosan
Copy link
Owner

@TheLocehiliosan TheLocehiliosan commented Oct 30, 2019

Also, yadm config is for setting yadm configurations. If you want to change a config for the local repo you can run yadm gitconfig instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.