Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recomment not to commit .gitfat for S3 backend. #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ Run `git fat init` to activate the extension. Now add and commit as usual.
Matched files will be transparently stored externally, but will appear
complete in the working tree.

## rsync remote

Set a remote store for the fat objects by editing `.gitfat`.

[rsync]
remote = your.remote-host.org:/share/fat-store

This file should typically be committed to the repository so that others
will automatically have their remote set. This remote address can use
any protocol supported by rsync.

Most users will configure it to use remote ssh in a directory with shared
access. To do this, set the `sshuser` and `sshport` variables in `.gitfat`
configuration file. For example, to use rsync with ssh, with the default
Expand All @@ -59,7 +57,20 @@ Edit your .gitfat file and add the following:
key={access_key_id}
secret={secret_access_key}

And then you're done.
And then you're done.

## Distributing .gitfat

This file (.gitfat) should typically be distributed to other users of the repository.
For the rsync backend, no identification information is stored, and .gitfat
can be committed to the repository so that others
will automatically have their remote set. This remote address can use
any protocol supported by rsync.

For the S3 backend, it is more complicated.
If the repository is (or will ever be) hosted publicly, do not commit .gitfat into the repository.
Doing so will expose your S3 identity to the world, and anybody can modify the files
hosted on the S3 bucket. Distribute the file via a secure channel instead.

# A worked example

Expand All @@ -80,7 +91,7 @@ First, we create a repository and configure it for use with `git-fat`.
remote = localhost:/tmp/fat-store
$ mkdir -p /tmp/fat-store # make sure the remote directory exists
$ echo '*.gz filter=fat -crlf' > .gitattributes
$ git add .gitfat .gitattributes
$ git add .gitfat .gitattributes # do not add .gitfat if S3 backend is used.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rainwoodman maybe we use different .gitfat .gitfat_s3 to avoid this completely.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zelonght [email protected] writes:

@@ -80,7 +91,7 @@ First, we create a repository and configure it for use with git-fat.
remote = localhost:/tmp/fat-store
$ mkdir -p /tmp/fat-store # make sure the remote directory exists
$ echo '*.gz filter=fat -crlf' > .gitattributes

  • $ git add .gitfat .gitattributes
  • $ git add .gitfat .gitattributes # do not add .gitfat if S3 backend is used.

@rainwoodman maybe we use different .gitfat .gitfat_s3 to avoid this completely.

I'm not sure about this -- .gitfat has something like 3 lines in it.
I don't think it would be worth splitting it into two separate files.

$ git commit -m'Initial repository'
[master (root-commit) eb7facb] Initial repository
2 files changed, 3 insertions(+)
Expand Down