encryptio / git-annex-remote-b2 Goto Github PK
View Code? Open in Web Editor NEWgit-annex special remote for Backblaze's B2
License: MIT License
git-annex special remote for Backblaze's B2
License: MIT License
mac os 10.13.4
git-annex: 6.20180529
latest git-annex-remote-b2 from the releases page
I get an error when trying to use git-annex-remote-b2 to copy a file.
Currently the credentials are stored as git annex settings, which makes them easy to use but possibly insecure on public repositories. git annex has internal credential storage, which can optionally embed the credentials in the repository (or not!). See the S3 remote for inspiration.
Running the test.bash through git-bash on windows produces the error:
initremote noencrypt git-annex: external special remote protocol error, unexpectedly received "UNSUPPORTED-REQUEST" (command not allowed at this time)
Any way I can help to resolve this?
According to this newsletter it will be neccessary to change the application key for b2. How do I do that with the special remote?
This remote uses lots of class C transactions to the B2 API, which can be quite expensive. I think this is mostly due to the calls to ListFileNames()
for each operation. Could it be possible to replace them with "simple" calls to GetFileInfo()
, a class B operation?
Thanks a lot for your work!
Hi there,
I created a b2 bucket over 24hrs ago (just in case these a propagation delay). When I attempt to init the remote I get couldn't open bucket
and it appears no buckets are found.
What I did
$ git annex initremote b2 type=external externaltype=b2 accountid=XYZ appkey=XYZ encryption=shared chunk=25MiB bucket=annex-field-recordings
initremote b2 (encryption setup) (encryption key stored in git repository) git-annex: Couldn't open bucket "annex-field-recordings": Post https://api001.backblazeb2.com/b2api/v1/b2_list_buckets: Found
$
Just out of curiosity it appears that my account + appkey are correct.
$ git annex initremote b2 type=external externaltype=b2 accountid=<wrong account ID> appkey=<correct appkey> encryption=shared chunk=25MiB bucket=annex-field-recordings
initremote b2 (encryption setup) (encryption key stored in git repository) git-annex: Couldn't authorize: UNAUTHORIZED - The account ID is wrong, the account does not have B2 enabled, or the application key is not valid
$ git annex initremote b2 type=external externaltype=b2 accountid=<correct account id> appkey=<wrong appkey> encryption=shared chunk=25MiB bucket=annex-field-recordings
initremote b2 (encryption setup) (encryption key stored in git repository) git-annex: Couldn't authorize: UNAUTHORIZED - The account ID is wrong, the account does not have B2 enabled, or the application key is not valid
Cheers, Jon
I tried to use b2 with a bucket name like my-cool-bucket
. I got the following error:
git-annex: couldn't create bucket "my-cool-bucket": bad_json: Invalid characters in bucketName: must be alphanumeric or '-'
Problems with this error message:
I tried deleting the bucket and letting git annex create it, but that produced the same error message.
I had some other parameters set that might be affecting this: encryption=pubkey mac=HMACSHA512
and my Backblaze credentials were set in shell environment variables.
Changing the name to MyCoolBucket worked fine.
Normal files in B2 have an upper limit of 5GB. There is support for files up to 10TB, but it requires a separate API to use. This bit me recently where I kept getting odd Java exceptions (i guess B2 doesn't have the cleanest error messages) when uploading files.
This might be something that is better suited for your dependency, but just wanted to give you a heads up that this sometimes happens if you wanted to look into it (I'll try to pick up Go one of these weekends and have a whack at it if you haven't).
Thanks a bunch for writing this special remote!
B2's API often (~0.2% of the time) fails to accept an upload that was properly formed, yet an immediate retry of the same upload request works. It's probably worth automatically retrying failed upload chunks once.
Will probably be needed for #10, due to the lack of resumption information when the user retries an upload.
I'm running the following code:
git annex initremote b2 type=external externaltype=b2 bucket=bucketfullofdata accountid=<<__RETRACTED>> appkey=<<__RETRACTED>> encryption=pubkey keyid=<<__RETRACTED>> mac=HMACSHA512 chunk=10MiB
initremote b2 (encryption setup) (to gpg keys: <<__RETRACTED>>) git-annex: Couldn't authorize: UNAUTHORIZED: The account ID is wrong, the account does not have B2 enabled, or the application key is not valid
However, I've triple checked the account id, application id and that the bucket is a valid name.
Any suggestions on what I might be doing wrong?
I'm trying to use git-annex-remote-b2
on Ubuntu 14.04 using:
$ git-annex version
git-annex version: 5.20140412ubuntu1
build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV Inotify DBus DesktopNotify XMPP DNS Feeds Quvi TDFA CryptoHash
key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL
remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier hook external
local repository version: 5
supported repository version: 5
upgrade supported from repository versions: 0 1 2 4
I built git-annex-remote-b2
with the go
command given in the README, then I copied the executable to /usr/local/bin
. Next, I tried to run the test.sh
script. I set the B2_*
environment variables as required. When I run test.sh
, various commands fail with the message external special remote protocol error, unexpectedly received "" (unable to parse command))
. First, one of the initremote
commands failed this way. I ran it by hand and it worked, then I continued to copy-paste the commands from test.sh
. git annex copy
failed on the first time, but the second time it ended ok. Then git annex fsck
failed. Is there a way to enable more verbose logging to track down what's going on?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.