webapp: When setting up a bare shared repository, enable non-fast-forward pushes.
This commit is contained in:
parent
0c0e0e5550
commit
0dfe604ddc
4 changed files with 20 additions and 1 deletions
|
@ -390,7 +390,7 @@ prepSsh' newgcrypt origsshdata sshdata keypair a = sshSetup
|
||||||
remoteCommand = shellWrap $ intercalate "&&" $ catMaybes
|
remoteCommand = shellWrap $ intercalate "&&" $ catMaybes
|
||||||
[ Just $ "mkdir -p " ++ shellEscape remotedir
|
[ Just $ "mkdir -p " ++ shellEscape remotedir
|
||||||
, Just $ "cd " ++ shellEscape remotedir
|
, Just $ "cd " ++ shellEscape remotedir
|
||||||
, if rsynconly then Nothing else Just "if [ ! -d .git ]; then git init --bare --shared; fi"
|
, if rsynconly then Nothing else Just "if [ ! -d .git ]; then git init --bare --shared && git config receive.denyNonFastforwards false; fi"
|
||||||
, if rsynconly || newgcrypt then Nothing else Just "git annex init"
|
, if rsynconly || newgcrypt then Nothing else Just "git annex init"
|
||||||
, if needsPubKey origsshdata
|
, if needsPubKey origsshdata
|
||||||
then addAuthorizedKeysCommand (hasCapability origsshdata GitAnnexShellCapable) remotedir . sshPubKey <$> keypair
|
then addAuthorizedKeysCommand (hasCapability origsshdata GitAnnexShellCapable) remotedir . sshPubKey <$> keypair
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -2,6 +2,8 @@ git-annex (4.20131025) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* assistant: When autostarted, wait 5 seconds before running the startup
|
* assistant: When autostarted, wait 5 seconds before running the startup
|
||||||
scan, to avoid contending with the user's desktop login process.
|
scan, to avoid contending with the user's desktop login process.
|
||||||
|
* webapp: When setting up a bare shared repository, enable non-fast-forward
|
||||||
|
pushes.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sat, 26 Oct 2013 12:11:48 -0400
|
-- Joey Hess <joeyh@debian.org> Sat, 26 Oct 2013 12:11:48 -0400
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
## 4.20131025
|
||||||
|
|
||||||
|
Note that all past versions of the assistant, when used to create a
|
||||||
|
git repository on a ssh server, set up the repository in a way that
|
||||||
|
prevents `git annex sync` from working (although the assistant can sync
|
||||||
|
with it). To fix this misconfiguration, you can ssh to the server
|
||||||
|
and run this command inside the bare git repository:
|
||||||
|
`git config receive.denyNonFastforwards false`
|
||||||
|
|
||||||
## version 4.20131024
|
## version 4.20131024
|
||||||
|
|
||||||
This version fixes several different bugs that could cause the webapp to
|
This version fixes several different bugs that could cause the webapp to
|
||||||
|
|
|
@ -285,3 +285,11 @@ Everything up-to-date
|
||||||
|
|
||||||
# End of transcript or log.
|
# End of transcript or log.
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> So, receive.denyNonFastforwards was the problem. It turns out that
|
||||||
|
> `git init --bare --shared` sets that by default, and the webapp
|
||||||
|
> uses that to create repositories on ssh server. I have made the webapp
|
||||||
|
> unset receive.denyNonFastforwards when setting up such a repository.
|
||||||
|
>
|
||||||
|
> Also added something to the assistant release notes about this
|
||||||
|
> to handle existing repositories. [[done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue