summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar https://id.koumbit.net/anarcat <https://id.koumbit.net/anarcat@web>2015-05-27 23:46:23 +0000
committerGravatar admin <admin@branchable.com>2015-05-27 23:46:23 +0000
commit964d6b263fb75f0805f1755121e488c3e973de4f (patch)
tree9461c219b4aca33f985c7c86220771366ea62da5
parent80da96ae178f39f5301f6bbb518bccbe3df36fb6 (diff)
explain how to use registerurl
-rw-r--r--doc/tips/publishing_your_files_to_the_public.mdwn14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/tips/publishing_your_files_to_the_public.mdwn b/doc/tips/publishing_your_files_to_the_public.mdwn
index ae65263a7..09f83bce0 100644
--- a/doc/tips/publishing_your_files_to_the_public.mdwn
+++ b/doc/tips/publishing_your_files_to_the_public.mdwn
@@ -61,3 +61,17 @@ To enable use a private S3 bucket for the remotes and then pre-sign actual URL w
Example:
key=`git annex lookupkey "$fname"`; sign_s3_url.bash --region 'eu-west-1' --bucket 'mybuck' --file-path $key --aws-access-key-id XX --aws-secret-access-key XX --method 'GET' --minute-expire 10
+
+## Adding the S3 URL as a source
+
+Assuming all files in the current directory are available on S3, this will register the public S3 url for the file in git-annex, making it available for everyone *through git-annex*:
+
+<pre>
+bucket=yourbucketname
+find * -type l | while read file ; do
+ key=$(git annex lookupkey $file)
+ echo $key https://$bucket.s3.amazonaws.com/$key
+done | git annex registerurl
+</pre>
+
+`registerurl` was introduced in `5.20150317`. There's a todo open to ensure we don't have to do this by hand: [[todo/credentials-less access to s3]].