#44 gin upload fails with unknown error

Open
opened 3 years ago by jbz · 2 comments

For a repository I am trying to seed with files, gin upload fails with a not specified error:

[lots of OK lines]
 Writing filename metadata "file.name" OK
:: Recording changes
   No changes recorded
:: Uploading

[error] 1 operation failed

git status shows some binary files as modified.

git diff reports these changes as changes of file mode:

diff --git a/file.name b/file.name
old mode 100644
new mode 100755

Running gin status shows 169 modified files. Performing a manual gin commit on one of these files does not fail but also does not change the status:

:: Adding file changes
 Added to annex "file.name" OK
 Writing filename metadata "file.name" OK
:: Recording changes
   No changes recorded

The affected files seem to be all large files (>40MB).

How do I clean up my repository (without losing data)?

Using

GIN command line client 1.10 Build 001448 (f8d30168ef1a59c627d791a4aa46d32c442c5045)
  git: 2.29.2
  git-annex: 8.20201103

on macOS 10.15.7

For a repository I am trying to seed with files, `gin upload` fails with a not specified error: ``` [lots of OK lines] Writing filename metadata "file.name" OK :: Recording changes No changes recorded :: Uploading [error] 1 operation failed ``` `git status` shows some binary files as `modified`. `git diff` reports these changes as changes of file mode: ``` diff --git a/file.name b/file.name old mode 100644 new mode 100755 ``` Running `gin status` shows 169 modified files. Performing a manual `gin commit` on one of these files does not fail but also does not change the status: ``` :: Adding file changes Added to annex "file.name" OK Writing filename metadata "file.name" OK :: Recording changes No changes recorded ``` The affected files seem to be all large files (>40MB). How do I clean up my repository (without losing data)? Using ``` GIN command line client 1.10 Build 001448 (f8d30168ef1a59c627d791a4aa46d32c442c5045) git: 2.29.2 git-annex: 8.20201103 ``` on macOS 10.15.7
Michael Sonntag commented 3 years ago
Owner

Hi Jonas, sorry you are having trouble with the client.

Could you try updating your client to the latest version and running gin sync? This will download changes from your remote repositories and then upload any local changes to the remotes. If this does not help, please check the gin logfile in the .cache/g-node/gin directory which should be located in your user folder. The logfile might contain more information about the occurring upload issue.

As a note, if you want to run git or git annex commands from a gin directory, please use gin git [command] or gin annex [command]. gin bundles its own version of git and git annex and running plain git commands will use the local installation which might cause version issues with the gin version of git.

Hi Jonas, sorry you are having trouble with the client. Could you try updating your client to the latest version and running `gin sync`? This will download changes from your remote repositories and then upload any local changes to the remotes. If this does not help, please check the gin logfile in the `.cache/g-node/gin` directory which should be located in your user folder. The logfile might contain more information about the occurring upload issue. As a note, if you want to run `git` or `git annex` commands from a gin directory, please use `gin git [command]` or `gin annex [command]`. gin bundles its own version of git and git annex and running plain git commands will use the local installation which might cause version issues with the gin version of git.
sprenger commented 3 years ago

Hi @jbz, I came across a similar error and I think I found a solution, maybe this one also works for you.

The issues of untracked changes in the file mode occurs in case of files being added to git annex, that are marked as executable. Here's a minimal example demonstrating this phenomenon

# create testfolder
WORKING_DIR=mingintest
if [ -d "$WORKING_DIR" ]; then chmod +w -R $WORKING_DIR; rm -r $WORKING_DIR; fi
ls .
mkdir $WORKING_DIR
cd $WORKING_DIR

# use git-annex for all files
echo \
'annex:
    minsize: 0' > config.yml

# create an executable test file
echo \
'Merry Christmas!\n
.. and a happy new year!' > test.md
chmod u+x test.md

# setup gin repo
gin --version
gin init

# commit all files
gin commit .

gin ls
git diff

echo 'Now the test file was added to the annex store, but is also still listed as containing unsaved changes due to a change in the file mode\n'

echo 'The situation can be resolved by locking and unlocking'
gin lock *
gin unlock *
gin ls

As you can see you can circumvent the untracked changes of the file mode by locking and unlocking the files. Does this work for you?

Hi @jbz, I came across a similar error and I think I found a solution, maybe this one also works for you. The issues of untracked changes in the file mode occurs in case of files being added to git annex, that are marked as executable. Here's a minimal example demonstrating this phenomenon ```sh # create testfolder WORKING_DIR=mingintest if [ -d "$WORKING_DIR" ]; then chmod +w -R $WORKING_DIR; rm -r $WORKING_DIR; fi ls . mkdir $WORKING_DIR cd $WORKING_DIR # use git-annex for all files echo \ 'annex: minsize: 0' > config.yml # create an executable test file echo \ 'Merry Christmas!\n .. and a happy new year!' > test.md chmod u+x test.md # setup gin repo gin --version gin init # commit all files gin commit . gin ls git diff echo 'Now the test file was added to the annex store, but is also still listed as containing unsaved changes due to a change in the file mode\n' echo 'The situation can be resolved by locking and unlocking' gin lock * gin unlock * gin ls ``` As you can see you can circumvent the untracked changes of the file mode by locking and unlocking the files. Does this work for you?
Sign in to join this conversation.
No Milestone
No assignee
3 Participants
Loading...
Cancel
Save
There is no content yet.