2011-03-27 22:52:13 -04:00
|
|
|
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.
|
|
|
|
|
2012-11-20 16:43:58 -04:00
|
|
|
First, export your Amazon AWS credentials:
|
2011-03-28 02:12:05 -04:00
|
|
|
|
2012-05-30 00:27:23 +00:00
|
|
|
# export AWS_ACCESS_KEY_ID="08TJMT99S3511WOZEP91"
|
|
|
|
# export AWS_SECRET_ACCESS_KEY="s3kr1t"
|
2011-03-28 02:12:05 -04:00
|
|
|
|
2011-04-16 19:30:31 -04:00
|
|
|
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.
|
2011-03-28 02:12:05 -04:00
|
|
|
|
2014-08-02 15:51:58 -04:00
|
|
|
# git annex initremote cloud type=S3 chunk=1MiB keyid=2512E3C7
|
2011-05-01 15:13:54 -04:00
|
|
|
initremote cloud (encryption setup with gpg key C910D9222512E3C7) (checking bucket) (creating bucket in US) (gpg) ok
|
2011-04-17 12:36:12 -04:00
|
|
|
# git annex describe cloud "at Amazon's US datacenter"
|
|
|
|
describe cloud ok
|
2011-03-28 13:47:29 -04:00
|
|
|
|
2011-03-29 18:21:05 -04:00
|
|
|
The configuration for the S3 remote is stored in git. So to make another
|
2011-03-29 15:12:07 -04:00
|
|
|
repository use the same S3 remote is easy:
|
|
|
|
|
2015-06-05 16:23:35 -04:00
|
|
|
# export AWS_ACCESS_KEY_ID="08TJMT99S3511WOZEP91"
|
|
|
|
# export AWS_SECRET_ACCESS_KEY="s3kr1t"
|
2011-06-22 17:47:14 -04:00
|
|
|
# git pull laptop
|
2015-01-20 12:42:02 -04:00
|
|
|
# git annex enableremote cloud
|
|
|
|
enableremote cloud (gpg) (checking bucket) ok
|
2011-03-28 02:12:05 -04:00
|
|
|
|
2015-06-05 16:23:35 -04:00
|
|
|
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.)
|
2011-03-28 02:12:05 -04:00
|
|
|
|
2019-04-23 14:45:34 -04:00
|
|
|
## further reading
|
|
|
|
|
|
|
|
See [[special_remotes/S3]] for details about configuring S3 remotes.
|
|
|
|
|
2015-06-05 16:23:35 -04:00
|
|
|
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.
|
2011-03-27 22:52:13 -04:00
|
|
|
|
2019-04-23 14:45:34 -04:00
|
|
|
If you want to publish files to S3 so they can be accessed without using
|
|
|
|
git-annex, see [[publishing_your_files_to_the_public]].
|