summaryrefslogtreecommitdiff
path: root/doc/tips/using_Amazon_S3.mdwn
blob: 85d5bc95882d4afee412233150a900f8be5d4b46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
git-annex extends git's usual remotes with some [[special_remotes]], that
are not git repositories. This way you can set up a remote using say,
Amazon S3, and use git-annex to transfer files into the cloud.

First, export your Amazon AWS credentials:

	# export AWS_ACCESS_KEY_ID="08TJMT99S3511WOZEP91"
	# export AWS_SECRET_ACCESS_KEY="s3kr1t"

Now, create a gpg key, if you don't already have one. This will be used
to encrypt everything stored in S3, for your privacy. Once you have
a gpg key, run `gpg --list-secret-keys` to look up its key id, something
like "2512E3C7"

Next, create the S3 remote, and describe it. 

	# git annex initremote cloud type=S3 chunk=1MiB keyid=2512E3C7
	initremote cloud (encryption setup with gpg key C910D9222512E3C7) (checking bucket) (creating bucket in US) (gpg) ok
	# git annex describe cloud "at Amazon's US datacenter"
	describe cloud ok

The configuration for the S3 remote is stored in git. So to make another
repository use the same S3 remote is easy:

	# export AWS_ACCESS_KEY_ID="08TJMT99S3511WOZEP91"
	# export AWS_SECRET_ACCESS_KEY="s3kr1t"
	# git pull laptop
	# git annex enableremote cloud
	enableremote cloud (gpg) (checking bucket) ok

Notice that to enable an existing S3 remote, you have to provide the Amazon
AWS credentials because they were not stored in the repository. (It is
possible to configure git-annex to do that, but not the default.)

See [[public_Amazon_S3_remote]] for how to set up a Amazon S3 remote that
can be used by the public, without them needing AWS credentials.

See [[special_remotes/S3]] for details about configuring S3 remotes.