git-remote-rclone
git-remote-rclone copied to clipboard
Crash when attempting to clone an existing remote repository
So, initialization, commiting, pushing, pulling, all work OK. Problem arises when I try to clone an existing remote in another location.
The steps to reproduce are:
- cd /tmp
- git init remote
- cd remote
- touch x
- git add x
- git commit -m init
- git remote add origin rclone://my/remote
- git push -u origin master
- cd ..
- rm -rf remote
- git clone rclone://my/remote
And the result of the last command is:
$ git clone rclone://my/remote
Cloning into 'remote'...
Traceback (most recent call last):
File "/home/jano/bin/git-remote-rclone", line 408, in <module>
main()
File "/home/jano/bin/git-remote-rclone", line 404, in main
rclone.communicate()
File "/home/jano/bin/git-remote-rclone", line 380, in communicate
self.import_refs_from_mirror(refs)
File "/home/jano/bin/git-remote-rclone", line 186, in import_refs_from_mirror
raise RuntimeError(
RuntimeError: rclone repository mirror not found
fatal: stream ends early
fast-import: dumping crash report to /tmp/remote/.git/fast_import_crash_2700224
fatal: error while running fast-import
Besides, the promised log at /tmp/remote/.git/fast_import_crash_2700224
does not exist, as the folder is not created yet it seems.
Any ideas on how to diagnose this further?
I'm unable to reproduce this. Here is what I tried:
rclone delete dropbox:test
rm -fr /tmp/gcrtest
mkdir -p /tmp/gcrtest
cd /tmp/gcrtest
git init reporoot
cd reporoot
touch x
git add x
git commit -m init
git remote add origin rclone://dropbox/test
git push -u origin main
cd ..
rm -rf reporoot
git clone rclone://dropbox/test
Works exactly as expected.