arnoo / git-deliver

Delivery system based on git push and ssh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After init-remote says remote is ready for deliveries get error remote does not look like a bare repo

drahamim opened this issue · comments

I am not sure why this error occurs.

I also couldn't get --init and --init-remote to work without first creating and doing a git init bare to get git-deliver to say that the remote is ready for deliveries.
Is there something I am doing wrong?

Let me know if I need to provide more details

Hi,

--init has nothing to do with the remote, so it should work. What error do
you get ?

After a few tests, though, --init-remote seems to have a problem in that if
you call it with a remote that already exists in your repo, it will ignore
the remote URL provided on the command line. I'll need to fix that.

I have no idea why you get the error in your subject. It would help if you
could try with the latest (f1c91b5) version, adding "set -x" before line
723 and "set +x" after line 725. This will activate debugging information
for the "bare repo" test.

On Sat, Aug 3, 2013 at 4:27 AM, drahamim notifications@github.com wrote:

I am not sure why this error occurs.

I also couldn't get --init and --init-remote to work without first
creating and doing a git init bare to get git-deliver to say that the
remote is ready for deliveries.
Is there something I am doing wrong?

Let me know if I need to provide more details


Reply to this email directly or view it on GitHubhttps://github.com//issues/42
.

So i ran the commands again with the changes you recommended after updating to the latest.
Here is what I got (server names needed to be redacted and were replaced with {LOCALSERVER} and {REMOTESERVER} )

drahamim@{LOCALSERVER}:~/repo/seven/testdir$ git deliver --init-remote perfadm root@{:testdir
root@{REMOTESERVER}'s password:
No scripts for stage init-remote
Remote is ready to receive deliveries
drahamim@{LOCALSERVER}:~/repo/seven/testdir$ git deliver perfadm v1
root@{REMOTESERVER}'s password:
++ run_remote 'ls -1d "~/testdir/objects" "~/testdir/refs" 2> /dev/null | wc -l'
++ COMMAND='cd /tmp && { ls -1d "~/testdir/objects" "~/testdir/refs" 2> /dev/null | wc -l ; }'
++ [[ root@{REMOTESERVER} = '' ]]
++ [[ /tmp/tmp.y6hHs2ghDh != '' ]]
++ echo 'running /tmp/git_deliver_ssh_wrapper_19895.sh "root@{REMOTESERVER}" "cd /tmp && { ls -1d "~/testdir/objects" "~/testdir/refs" 2> /dev/null | wc -l ; }"'
++ /tmp/git_deliver_ssh_wrapper_19895.sh root@{REMOTESERVER} 'cd /tmp && { ls -1d "~/testdir/objects" "~/testdir/refs" 2> /dev/null | wc -l ; }'
+ [[ 0 -lt 2 ]]
+ exit_with_error 1 'ERROR : Remote does not look like a bare git repo'
+ local code=1
+ local 'msg=ERROR : Remote does not look like a bare git repo'
+ echo_red 'ERROR : Remote does not look like a bare git repo'
+ local 'msg=ERROR : Remote does not look like a bare git repo'
+ [[ true == true ]]
+ echo -ne '\E[31m'
+ echo 'ERROR : Remote does not look like a bare git repo'
ERROR : Remote does not look like a bare git repo
+ [[ true == true ]]
+ echo -ne '\033[0m'
+ exit 1
+ ssh_cleanup
+ /tmp/git_deliver_ssh_wrapper_19895.sh
+ rm -f /tmp/git_deliver_ssh_wrapper_19895.sh
drahamim@{LOCALSERVER}:~/repo/seven/testdir$

Ok, thanks. It looks like the tilde is the issue, sorry abouti that. i'il see how I can fix it. In the meantime, you can setup your remote with the explicit home path.Le 3 août 2013 19:16, drahamim notifications@github.com a écrit : So i ran the commands again with the changes you recommended after updating to the latest.
Here is what I got (server names needed to be redacted and were replaced with {LOCALSERVER} and {REMOTESERVER} )

drahamim@{LOCALSERVER}:/repo/seven/testdir$ git deliver --init-remote perfadm root@{:testdir
root@{REMOTESERVER}'s password:
No scripts for stage init-remote
Remote is ready to receive deliveries
drahamim@{LOCALSERVER}:
/repo/seven/testdir$ git deliver perfadm v1
root@{REMOTESERVER}'s password:
++ run_remote 'ls -1d "/testdir/objects" "/testdir/refs" 2> /dev/null | wc -l'
++ COMMAND='cd /tmp && { ls -1d "/testdir/objects" "/testdir/refs" 2> /dev/null | wc -l ; }'
++ [[ root@{REMOTESERVER} = '' ]]
++ [[ /tmp/tmp.y6hHs2ghDh != '' ]]
++ echo 'running /tmp/git_deliver_ssh_wrapper_19895.sh "root@{REMOTESERVER}" "cd /tmp && { ls -1d "/testdir/objects" "/testdir/refs" 2> /dev/null | wc -l ; }"'
++ /tmp/git_deliver_ssh_wrapper_19895.sh root@{REMOTESERVER} 'cd /tmp && { ls -1d "/testdir/objects" "/testdir/refs" 2> /dev/null | wc -l ; }'

  • [[ 0 -lt 2 ]]
  • exit_with_error 1 'ERROR : Remote does not look like a bare git repo'
  • local code=1
  • local 'msg=ERROR : Remote does not look like a bare git repo'
  • echo_red 'ERROR : Remote does not look like a bare git repo'
  • local 'msg=ERROR : Remote does not look like a bare git repo'
  • [[ true == true ]]
  • echo -ne '\E[31m'
  • echo 'ERROR : Remote does not look like a bare git repo'
    ERROR : Remote does not look like a bare git repo
  • [[ true == true ]]
  • echo -ne '\033[0m'
  • exit 1
  • ssh_cleanup
  • /tmp/git_deliver_ssh_wrapper_19895.sh
  • rm -f /tmp/git_deliver_ssh_wrapper_19895.sh
    drahamim@{LOCALSERVER}:~/repo/seven/testdir$

—Reply to this email directly or view it on GitHub.

Thanks.

Meant to comment instead of close

This is still a problem for me, although the workaround of using absolute paths works great.

This is fixed by commit faab351 which adds tilde expansion for remote URLs.