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

Initial sync aborts if permissions aren't set up properly on the remote server #14

Open
natevolker opened this issue Jan 7, 2014 · 1 comment

Comments

@natevolker
Copy link

If the remote file "file.png" doesn't have the correct permissions, the following error happens on the initial sync:

[user@example.com] Executing task 'initial_sync'
[user@example.com] Setting up /remote/dir/
[user@example.com] The git repo already exist: /remote/dir/.git
[localhost] local: git clone ssh://example.com/remote/dir/ /local/dir/
Cloning into '/local/dir'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
[localhost] local: git branch branch
[localhost] local: git checkout branch
Switched to branch 'branch'
[user@example.com]  /remote/dir/ (remote) has uncommitted changes.
[user@example.com] run: git add .
[user@example.com] out: error: open("file.png"): Permission denied
[user@example.com] out: error: unable to index file file.png
[user@example.com] out: fatal: adding files failed
[user@example.com] out: 


Fatal error: run() received nonzero return code 128 while executing!

Requested: git add .
Executed: /bin/bash -l -c "cd /remote/dir/ && git add ."

Aborting.

To get the initial sync to work again (after fixing the permissions issue), you need to delete both the local directory, and the ".git" directory from the remote server.

@centerorbit
Copy link
Contributor

Ahhh I did notice this too, I encountered it for sites that had a data directory in which the files were under a different permission. My "solution" was to git ignore data directory to ignore the file upload directory, since I wasn't running anything locally. But I agree, this should be properly handled.

Also, welcome!

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

No branches or pull requests

2 participants