diff options
Diffstat (limited to 'doc')
17 files changed, 507 insertions, 172 deletions
diff --git a/doc/bugs/OOM_while_configuring_git-annex.mdwn b/doc/bugs/OOM_while_configuring_git-annex.mdwn new file mode 100644 index 000000000..cd5d878bc --- /dev/null +++ b/doc/bugs/OOM_while_configuring_git-annex.mdwn @@ -0,0 +1,46 @@ +### Please describe the problem. +When running configure, the system runs out of memory: + +[[https://kojipkgs.fedoraproject.org//work/tasks/1587/10431587/build.log]] + +built with versions from: + +[[https://kojipkgs.fedoraproject.org//work/tasks/1587/10431587/root.log]] + +### What steps will reproduce the problem? +Rebuilding on koji. Also occurs in mock. Haven't tried a naked build (yet). + +### What version of git-annex are you using? On what operating system? +Currently, 5.20141203. Newest snapshot requires deps not yet packaged in Fedora. + +### Please provide any additional information below. + +[[!format sh """ ++ ./Setup configure --prefix=/usr --libdir=/usr/lib --docdir=/usr/share/doc/git-annex '--libsubdir=$compiler/$pkgid' '--datasubdir=$pkgid' --ghc --enable-executable-dynamic '--ghc-options= -optc-O2 -optc-g -optc-pipe -optc-Wall -optc-Werror=format-security -optc-Wp,-D_FORTIFY_SOURCE=2 -optc-fexceptions -optc-fstack-protector-strong -optc--param=ssp-buffer-size=4 -optc-grecord-gcc-switches -optc-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -optc-m32 -optc-march=i686 -optc-mtune=atom -optc-fasynchronous-unwind-tables -optl-Wl,-z,relro' + checking version...fatal: Not a git repository (or any of the parent directories): .git + 5.20141203 + checking UPGRADE_LOCATION... not available + checking git... yes + checking git version... 2.4.6 + checking cp -a... yes + checking cp -p... yes + checking cp --preserve=timestamps... yes + checking cp --reflink=auto... yes + checking xargs -0... yes + checking rsync... yes + checking curl... yes + checking wget... no + checking bup... no + checking nice... yes + checking ionice... yes + checking nocache... no + checking gpg... gpg2 + checking lsof... not available + checking git-remote-gcrypt... not available + checking ssh connection caching... yes + checking sha1... sha1sum + checking sha256... sha256sum + checking sha512... sha512sum + checking sha224... sha224sum + checking sha384...Setup: out of memory (requested 1048576 bytes) +"""]] diff --git a/doc/bugs/OOM_while_configuring_git-annex/comment_1_247c4d778766c9079024c78582a69ed4._comment b/doc/bugs/OOM_while_configuring_git-annex/comment_1_247c4d778766c9079024c78582a69ed4._comment new file mode 100644 index 000000000..19a52bed9 --- /dev/null +++ b/doc/bugs/OOM_while_configuring_git-annex/comment_1_247c4d778766c9079024c78582a69ed4._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2015-07-22T03:36:11Z" + content=""" +This is due to cabal's dependency resolver not finding a solution and +recursing too much. Passing -v3 will show what the dependency problem is. + +(Using stackage is a good way to avoid these kinds of dependency problems.) +"""]] diff --git a/doc/bugs/git-annex_sync_under_windows_fails_by_using_itself_as_the_ssh_command/comment_5_f82ac380383f5116ca1c3b49cdec0648._comment b/doc/bugs/git-annex_sync_under_windows_fails_by_using_itself_as_the_ssh_command/comment_5_f82ac380383f5116ca1c3b49cdec0648._comment new file mode 100644 index 000000000..d0a023684 --- /dev/null +++ b/doc/bugs/git-annex_sync_under_windows_fails_by_using_itself_as_the_ssh_command/comment_5_f82ac380383f5116ca1c3b49cdec0648._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="threadshuffle" + subject="same problem" + date="2015-07-21T19:01:52Z" + content=""" +Hi, i have the same problem. I can't compile from source but ive looked at the process and it seems that GIT_SSH/GIT_ANNEX_SSHOPTION are set ok. Ive also looked through the source even though my haskell is quite limited and eventually managed to get something working by bypassing the +<pre><code>g' <- addGitEnv g sshOptionsEnv val +addGitEnv g' \"GIT_SSH\" command</code></pre> +lines but i can't remember right now how i did it, though i remember it was by setting something similar to GIT_SSH (probably just it to 'c:\program...\git\bin\git.exe' or ssh.exe with a combination of GIT_ANNEX_SSHOPTION=''). +It didn't show the 'git annex unknown command' stuff but it did mess up the repo (said it synced the annex/direct/master synced/* branches but the changed didn't appear on the remote/origin). +If there's anything i can try without actually compiling, im all up for it. +"""]] diff --git a/doc/bugs/sync__47__git-annex_branch_not_syncing_in_the_assistant.mdwn b/doc/bugs/sync__47__git-annex_branch_not_syncing_in_the_assistant.mdwn new file mode 100644 index 000000000..d7c679e22 --- /dev/null +++ b/doc/bugs/sync__47__git-annex_branch_not_syncing_in_the_assistant.mdwn @@ -0,0 +1,49 @@ +### Please describe the problem. + +It seems that the `synced/git-annex` branch (which I am a little confused about in the first place), doesn't get synced automatically by the assistant. + +I was expecting the assistant to regularly do the equivalent of `git annex sync`. However, after a client pushed changes to the `git-annex` branch, I had to manually do a `git annex sync` for the changes of the `synced/git-annex` branch to be merged down into the local `git-annex`. + +### What steps will reproduce the problem? + +I have 3 machines in this setup (to simplify: there are more, but those are sufficient). Let's call them foo, bar and quux. foo and quuex are connected to bar through password-less SSH connexions. + +foo commits a file to git-annex. the assistant syncs that to bar in the `synced/git-annex` branch. + +quux syncs with bar, and seems to ignore the `synced/git-annex` branch. + +git-annex sync on quux syncs the `synced/git-annex` branch into the local `git-annex`, working around the issue. + +### What version of git-annex are you using? On what operating system? + +foo is 5.20150610+gitg608172f-1~ndall+1 on Debian 7.8 (wheezy). + +bar and quux are 5.20150409+git126-ga29f683-1~ndall+1 and 5.20150610+gitg608172f-1~ndall+1 (respectively) on Ubuntu 12.04 (precise) . + +### Please provide any additional information below. + +I guess a more general question is how and how often do those branches get merged by the assistant... it's still unclear to me how this works. + +[[!format sh """ +$ sudo -u www-data -H git annex sync +(merging origin/synced/git-annex into git-annex...) +(recording state in git...) +commit ok +pull origin +Auto packing the repository in background for optimum performance. +See "git help gc" for manual housekeeping. + +Already up-to-date. +ok +push origin +Counting objects: 373637, done. +# End of transcript or log. +"""]] + +This was started at 20:23 UTC. Note that the sync had run previously under the assistant: + +<pre> +[2015-07-22 20:09:06 UTC] RemoteControl: Syncing with origin +</pre> + +Available, as usual, for further debugging. :) -- [[anarcat]] diff --git a/doc/devblog/day_302-305__gitlab.mdwn b/doc/devblog/day_302-305__gitlab.mdwn new file mode 100644 index 000000000..05048ebb6 --- /dev/null +++ b/doc/devblog/day_302-305__gitlab.mdwn @@ -0,0 +1,30 @@ +I've been working on adding GitLab support to the webapp for the past 3 +days. + +That's not the only thing I've been working on; I've continued to work on +the older parts of the backlog, which is now shrunk to 91 messages, and +made some minor improvements and bugfixes. + +But, GitLab support in the webapp has certianly taken longer than I'd have +expected. Only had to write 82 lines of GitLab specific code so far, but it +went slowly. The user will need to cut and paste repository url and +ssh public key back and forth between the webapp and GitLab for now. And +the way GitLab repositories use git-annex makes it a bit tricky to set up; +in one case the webapp has to do a forced push dry run to check if the +repository on GitLab can be accessed by ssh. + +I found a way to adapt the existing code for setting up a ssh server to +also support GitLab, so beyond the repo url prompt and ssh key setup, +everything will be reused. I have something that works now, but there are +lots of cases to test (encrypted repositories, enabling existing +repositories, etc), so will need to work on it a bit more before merging +this feature. + +Also took some time to split the [centralized git repository tutorial](http://git-annex.branchable.com/tips/centralized_git_repository_tutorial/) +into three parts, one for each of GitHub, GitLab, and self-administered servers. + +---- + +The git-annex package in Debian unstable hasn't been updated for 8 months. +This is about to change; Richard Hartmann has stepped up and is preparing +an upload of a recent version. Yay! diff --git a/doc/forum/Windows_-_You_don__39__t_have_access/comment_5_f9041e48b911dbdd37ad3c1bbc801709._comment b/doc/forum/Windows_-_You_don__39__t_have_access/comment_5_f9041e48b911dbdd37ad3c1bbc801709._comment new file mode 100644 index 000000000..b77d09c12 --- /dev/null +++ b/doc/forum/Windows_-_You_don__39__t_have_access/comment_5_f9041e48b911dbdd37ad3c1bbc801709._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="fusionx86@2cab672ef75a8502e153ceb90177dde38985dba9" + nickname="fusionx86" + subject="comment 5" + date="2015-07-20T20:41:00Z" + content=""" +Also, I created git-annex-shell.exe as a copy of git-annex.exe which you recommended here: https://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/. + +I also made sure UAC and Windows Firewall were disabled and they already were. + +What environment variables should exist to support annex? I see references to GIT_ANNEX_SSHOPTION and GIT_SSH, but those aren't currently configured on my Windows server. The git, git-annex and git-annex-shell files are in the global path and accessible from anywhere. +"""]] diff --git a/doc/git-annex-addurl.mdwn b/doc/git-annex-addurl.mdwn index 99b1f8c65..888f6ac31 100644 --- a/doc/git-annex-addurl.mdwn +++ b/doc/git-annex-addurl.mdwn @@ -48,13 +48,22 @@ be used to get better filenames. * `--pathdepth=N` - This causes a shorter filename to be used. For example, - `--pathdepth=1` will use "dir/subdir/bigfile", - while `--pathdepth=3` will use "bigfile". + Rather than basing the filename on the whole url, this causes a path to + be constructed, starting at the specified depth within the path of the + url. + + For example, adding the url http://www.example.com/dir/subdir/bigfile + with `--pathdepth=1` will use "dir/subdir/bigfile", + while `--pathdepth=3` will use "bigfile". It can also be negative; `--pathdepth=-2` will use the last two parts of the url. +* `--prefix=foo` `--suffix=bar` + + Use to adjust the filenames that are created by addurl. For example, + `--suffix=.mp3` can be used to add an extension to the file. + # SEE ALSO [[git-annex]](1) diff --git a/doc/git-annex-importfeed.mdwn b/doc/git-annex-importfeed.mdwn index 1c9af2ff3..26401f4e5 100644 --- a/doc/git-annex-importfeed.mdwn +++ b/doc/git-annex-importfeed.mdwn @@ -34,7 +34,7 @@ To make the import process add metadata to the imported files from the feed, Other available variables for templates: feedauthor, itemauthor, itemsummary, itemdescription, itemrights, itemid, itempubdate, title, author -* `--relaxed`, `--fast`, `--raw`, `--template` +* `--relaxed`, `--fast`, `--raw` These options behave the same as when using [[git-annex-addurl]](1). diff --git a/doc/install/ScientificLinux5.mdwn b/doc/install/ScientificLinux5.mdwn index 52d83f0d9..442fcb3bf 100644 --- a/doc/install/ScientificLinux5.mdwn +++ b/doc/install/ScientificLinux5.mdwn @@ -31,32 +31,7 @@ don't want things to be system wide) $ export PATH=/usr/hs/bin:$PATH -Once the packages are installed and are in your execution path, using -cabal to configure and build git-annex just makes life easier, it -should install all the needed dependancies. - - $ cabal update - $ git clone git://git.kitenet.net/git-annex - $ cd git-annex - $ make git-annex.1 - $ cabal configure - $ cabal build - $ cabal install - -Or if you want to install it globallly for everyone (otherwise it will -get installed into $HOME/.cabal/bin) - - $ cabal install --global - -The above will take a while to compile and install the needed -dependancies. I would suggest any user who does should run the tests -that comes with git-annex to make sure everything is functioning as -expected. - -I haven't had a chance or need to install git-annex on a SL6 based -system yet, but I would assume something similar to the above steps -would be required to do so. - -The above is almost a cut and paste of <http://jcftang.github.com/2012/06/15/installing-git-annex-on-sl5/>, the above could probably be refined, it was what worked for me on SL5. Please feel free to re-edit and chop out or add useless bits of text in the above! - -Note: from the minor testing, it appears the compiled binaries from SL5 will work on SL6. +Once the GHC packages are installed and are in your execution path, using +cabal to build git-annex just makes life easier, it +should install all the needed dependancies. See "minimal build with cabal +and stackage" in [[fromsource]] for instructions. diff --git a/doc/install/fromsource.mdwn b/doc/install/fromsource.mdwn index fdb7823fc..1c0bc06d7 100644 --- a/doc/install/fromsource.mdwn +++ b/doc/install/fromsource.mdwn @@ -48,8 +48,8 @@ which is a more stable and consistent version of the Hackage repository. Inside the source tree, run: - cabal configure -f"-assistant -webapp -webdav -pairing -xmpp -dns" cabal install -j -f"-assistant -webapp -webdav -pairing -xmpp -dns" --only-dependencies + cabal configure -f"-assistant -webapp -webdav -pairing -xmpp -dns" cabal build -j PATH=$HOME/bin:$PATH cabal install --bindir=$HOME/bin @@ -65,8 +65,8 @@ Using [Stackage](http://www.stackage.org/) is again a good idea here! Once the C libraries are installed, run inside the source tree: - cabal configure cabal install -j --only-dependencies + cabal configure cabal build -j PATH=$HOME/bin:$PATH cabal install --bindir=$HOME/bin diff --git a/doc/tips/centralized_git_repository_tutorial.mdwn b/doc/tips/centralized_git_repository_tutorial.mdwn index e646ed0ee..4019c116e 100644 --- a/doc/tips/centralized_git_repository_tutorial.mdwn +++ b/doc/tips/centralized_git_repository_tutorial.mdwn @@ -1,142 +1,18 @@ The [[walkthrough]] builds up a decentralized git repository setup, but -git-annex can also be used with a centralized bare repository, just like -git can. This tutorial shows how to set up a centralized repository hosted on -GitHub on GitLab or your own git server. +git-annex can also be used with a centralized git repository. -## set up the repository, and make a checkout +We have separate tutorials depending on where the centralized git +repository is hosted. -I've created a repository for technical talk videos, which you can -[fork on Github](https://github.com/joeyh/techtalks). -Or make your own repository on GitHub (or GitLab elsewhere) now. +* [[centralized_git_repository_tutorial/On_GitHub]] -- + However, GitHub does not currently let git-annex + store the contents of large files there. So, things get a little more + complicated when using it. -On your laptop, [[install]] git-annex, and clone the repository: +* [[centralized_git_repository_tutorial/On_GitLab]] -- + This service is similar to GitHub, but supports + git-annex. - # git clone git@github.com:joeyh/techtalks.git - # cd techtalks - -Tell git-annex to use the repository, and describe where this clone is -located: - - # git annex init 'my laptop' - init my laptop ok - -Let's tell git-annex that GitHub doesn't support running git-annex-shell there. - - # git config remote.origin.annex-ignore true - -This means you can't store annexed file *contents* on GitHub; it would -really be better to host the bare repository on your own server, which -would not have this limitation. (If you want to do that, check out -[[using_gitolite_with_git-annex]].) Or, you could use GitLab, which -*does* [support git-annex on their servers](https://about.gitlab.com/2015/02/17/gitlab-annex-solves-the-problem-of-versioning-large-binaries-with-git/). - -## add files to the repository - -Add some files, obtained however. - - # youtube-dl -t 'http://www.youtube.com/watch?v=b9FagOVqxmI' - # git annex add *.mp4 - add Haskell_Amuse_Bouche-b9FagOVqxmI.mp4 (checksum) ok - (Recording state in git...) - # git commit -m "added a video. I have not watched it yet but it sounds interesting" - -This file is available directly from the web; so git-annex can download it: - - # git annex addurl http://kitenet.net/~joey/screencasts/git-annex_coding_in_haskell.ogg - addurl kitenet.net_~joey_screencasts_git-annex_coding_in_haskell.ogg - (downloading http://kitenet.net/~joey/screencasts/git-annex_coding_in_haskell.ogg ...) - (checksum...) ok - (Recording state in git...) - # git commit -a -m 'added a screencast I made' - -Feel free to rename the files, etc, using normal git commands: - - # git mv Haskell_Amuse_Bouche-b9FagOVqxmI.mp4 Haskell_Amuse_Bouche.mp4 - # git mv kitenet.net_~joey_screencasts_git-annex_coding_in_haskell.ogg git-annex_coding_in_haskell.ogg - # git commit -m 'better filenames' - -Now push your changes back to the central repository. As well as pushing -the master branch, remember to push the git-annex branch, which is used to -track the file contents. - - # git push origin master git-annex - To git@github.com:joeyh/techtalks.git - * [new branch] master -> master - * [new branch] git-annex -> git-annex - -That push went fast, because it didn't upload large videos to GitHub. -To check this, you can ask git-annex where the contents of the videos are: - - # git annex whereis - whereis Haskell_Amuse_Bouche.mp4 (1 copy) - 767e8558-0955-11e1-be83-cbbeaab7fff8 -- here - ok - whereis git-annex_coding_in_haskell.ogg (2 copies) - 00000000-0000-0000-0000-000000000001 -- web - 767e8558-0955-11e1-be83-cbbeaab7fff8 -- here - ok - -## make more checkouts - -So far you have a central repository, and a checkout on a laptop. -Let's make another checkout that's used as a backup. You can put it anywhere -you like, just make it be somewhere your laptop can access. A few options: - -* Put it on a USB drive that you can plug into the laptop. -* Put it on a desktop. -* Put it on some server in the local network. -* Put it on a remote VPS. - -I'll use the VPS option, but these instructions should work for -any of the above. - - # ssh server - server# sudo apt-get install git-annex - -Clone the central repository as before. (If the clone fails, you need -to add your server's ssh public key to github -- see -[this page](http://help.github.com/ssh-issues/).) - - server# git clone git@github.com:joeyh/techtalks.git - server# cd techtalks - server# git config remote.origin.annex-ignore true - server# git annex init 'backup' - init backup (merging origin/git-annex into git-annex...) ok - -Notice that the server does not have the contents of any of the files yet. -If you run `ls`, you'll see broken symlinks. We want to populate this -backup with the file contents, by copying them from your laptop. - -Back on your laptop, you need to configure a git remote for the backup. -Adjust the ssh url as needed to point to wherever the backup is. (If it -was on a local USB drive, you'd use the path to the repository instead.) - - # git remote add backup ssh://server/~/techtalks - -Now git-annex on your laptop knows how to reach the backup repository, -and can do things like copy files to it: - - # git annex copy --to backup git-annex_coding_in_haskell.ogg - copy git-annex_coding_in_haskell.ogg (checking backup...) - 12877824 2% 255.11kB/s 00:00 - ok - -You can also `git annex move` files to it, to free up space on your laptop. -And then you can `git annex get` files back to your laptop later on, as -desired. - -After you use git-annex to move files around, remember to push, -which will broadcast its updated location information. - - # git push origin master git-annex - -## take it farther - -Of course you can create as many checkouts as you desire. If you have a -desktop machine too, you can make a checkout there, and use `git remote -add` to also let your desktop access the backup repository. - -You can add remotes for each direct connection between machines you find you -need -- so make the laptop have the desktop as a remote, and the desktop -have the laptop as a remote, and then on either machine git-annex can -access files stored on the other. +* [[centralized_git_repository_tutorial/On_your_own_server]] -- + use any unix system with ssh and git and git-annex installed. + A VPS, a home server, etc. diff --git a/doc/tips/centralized_git_repository_tutorial/on_GitHub.mdwn b/doc/tips/centralized_git_repository_tutorial/on_GitHub.mdwn new file mode 100644 index 000000000..4522319b3 --- /dev/null +++ b/doc/tips/centralized_git_repository_tutorial/on_GitHub.mdwn @@ -0,0 +1,129 @@ +This tutorial shows how to set up a centralized repository hosted on +GitHub. + +GitHub does not currently let git-annex store the contents of large files +there. This doesn't prevent using git-annex with GitHub, it just means you +have to set up some other centralized location for the large files. + +## set up the repository, and make a checkout + +I've created a repository for technical talk videos, which you can +[fork on Github](https://github.com/joeyh/techtalks). +Or make your own repository on GitHub now. + +On your laptop, [[install]] git-annex, and clone the repository: + + # git clone git@github.com:joeyh/techtalks.git + # cd techtalks + +Tell git-annex to use the repository, and describe where this clone is +located: + + # git annex init 'my laptop' + init my laptop ok + +## add files to the repository + +Add some files, obtained however. + + # git annex add *.mp4 + add Haskell_Amuse_Bouche-b9OVqxmI.mp4 (checksum) ok + (Recording state in git...) + # git commit -m "added a video. I have not watched it yet but it sounds interesting" + +This file is available on the web; so git-annex can download it: + + # git annex addurl http://kitenet.net/~joey/screencasts/git-annex_coding_in_haskell.ogg + addurl kitenet.net_~joey_screencasts_git-annex_coding_in_haskell.ogg + (downloading http://kitenet.net/~joey/screencasts/git-annex_coding_in_haskell.ogg ...) + (checksum...) ok + (Recording state in git...) + # git commit -a -m 'added a screencast I made' + +Feel free to rename the files, etc, using normal git commands: + + # git mv Haskell_Amuse_Bouche-b9OVqxmI.mp4 Haskell_Amuse_Bouche.mp4 + # git mv kitenet.net_~joey_screencasts_git-annex_coding_in_haskell.ogg git-annex_coding_in_haskell.ogg + # git commit -m 'better filenames' + +Now push your changes back to the central repository on GitHub. As well as +pushing the master branch, remember to push the git-annex branch, which is +used to track the file contents. You can do this push manually as shown +below, or you can just run `git annex sync` to do the same thing. + + # git push origin master git-annex + To git@github.com:joeyh/techtalks.git + * [new branch] master -> master + * [new branch] git-annex -> git-annex + +That push went fast, because it didn't upload large videos to GitHub. +To check this, you can ask git-annex where the contents of the videos are: + + # git annex whereis + whereis Haskell_Amuse_Bouche.mp4 (1 copy) + 767e8558-0955-11e1-be83-cbbeaab7fff8 -- here + ok + whereis git-annex_coding_in_haskell.ogg (2 copies) + 00000000-0000-0000-0000-000000000001 -- web + 767e8558-0955-11e1-be83-cbbeaab7fff8 -- here + ok + +## make more checkouts + +So far you have a central repository, and a checkout on a laptop. +You, or anyone you allow to can clone the central repository, and +use git-annex with it. + +But, since GitHub doesn't currently support storing large files there +with git-annex, other checkouts of your repository won't be able to +access the files you added to the repository on your laptop. + + # git clone git@github.com:myrepo/techtalks.git + # git annex get Haskell_Amuse_Bouche-b9OVqxmI.mp4 + get Haskell_Amuse_Bouche-b9OVqxmI.mp4 + + Try making some of these repositories available: + 767e8558-0955-11e1-be83-cbbeaab7fff8 -- my laptop + failed + +## add a special remote + +So, to complete your setup, you need to set up a repository where git-annex +can store the contents of large files. This is often done by setting up +a [[special_remote|special_remotes]]. One free option is explained in +[[using_box.com_as_a_special_remote]]. Another useful approach is +explained in [[public_Amazon_S3_remote]]. + +Once you have the special remote set up on your laptop, you can +send files to it: + + # git annex copy --to myspecialremote Haskell_Amuse_Bouche-b9OVqxmI.mp4 + copy Haskell_Amuse_Bouche-b9OVqxmI.mp4 (to myspecialremote...) + 100% 255.11kB/s + ok + +You can also `git annex move` files to it, to free up space on your laptop. +And then you can `git annex get` files back to your laptop later on, as +desired. + +After you use git-annex to move files around, remember to sync, +which will broadcast its updated location information. + + # git annex sync + +After setting up the special remote and storing some files on it, +you can download them on other clones. You'll first need to enable the same +special remote on the clones. + + # git annex sync + # git annex enableremote myspecialremote + # git annex get git-annex_coding_in_haskell.ogg + 100% 255.11kB/s + ok + +## take it farther + +You can add remotes for each direct connection between machines you find you +need -- so make the laptop have the desktop as a remote, and the desktop +have the laptop as a remote, and then on either machine git-annex can +access files stored on the other. diff --git a/doc/tips/centralized_git_repository_tutorial/on_GitLab.mdwn b/doc/tips/centralized_git_repository_tutorial/on_GitLab.mdwn new file mode 100644 index 000000000..71814a99a --- /dev/null +++ b/doc/tips/centralized_git_repository_tutorial/on_GitLab.mdwn @@ -0,0 +1,76 @@ +This tutorial shows how to set up a centralized repository hosted on +GitLab. + +Since GitLab has [added support for git-annex on their servers](https://about.gitlab.com/2015/02/17/gitlab-annex-solves-the-problem-of-versioning-large-binaries-with-git/), +you can store your large files on GitLab, quite easily. + +Note that as I'm writing this, GitLab is providing this service for free, +and I don't know how much data they're willing to host for free. + +## create the repository + +Go to <https://gitlab.com/> and sign up for an account, and create the +repository there. Take note of the SSH clone url for the repository, which +will be something like `git@gitlab.com:yourlogin/annex.git`. + +We want to clone this locally, on your laptop. (If the clone fails, you +need to generate a ssh key and add it to GitLab.) + + # git clone git@gitlab.com:yourlogin/annex.git + # cd annex + +Tell git-annex to use the repository, and describe where this clone is +located: + + # git annex init 'my laptop' + init my laptop ok + +Add some files, obtained however. + + # git annex add *.mp4 + add Haskell_Amuse_Bouche-b9OVqxmI.mp4 (checksum) ok + (Recording state in git...) + # git commit -m "added a video. I have not watched it yet but it sounds interesting" + +Feel free to rename the files, etc, using normal git commands: + + # git mv Haskell_Amuse_Bouche-b9OVqxmI.mp4 Haskell_Amuse_Bouche.mp4 + # git commit -m 'better filenames' + +## push to GitLab + +Now make a first push to the GitLab repository. +As well as pushing the master branch, remember to push the git-annex +branch, which is used to track the file contents. + + # git push origin master git-annex + To git@gitlab.com:yourlogin/annex.git + * [new branch] master -> master + * [new branch] git-annex -> git-annex + +That push went fast, because it didn't upload the large file contents yet. + +So, to finish up, tell git-annex to sync all the data in the repository +to GitLab: + + # git annex sync --content + ... + +## make more checkouts + +So far you have a central repository on GitLab, and a checkout on a laptop. +Let's make another checkout elsewhere. Clone the central repository as before. +(If the clone fails, you need to generate a ssh key and add it to GitLab.) + + elsewhere# git clone git@gitlab.com:yourlogin/annex.git + elsewhere# cd annex + +Notice that your clone does not have the contents of any of the files yet. +If you run `ls`, you'll see broken symlinks. It's easy to download them from +GitLab either by running `git annex sync --content`, or by asking +git-annex to download individual files: + + # git annex get Haskell_Amuse_Bouche.mp4 + get Haskell_Amuse_Bouche.mp4 (from origin...) + 12877824 2% 255.11kB/s 00:00 + ok diff --git a/doc/tips/centralized_git_repository_tutorial/on_your_own_server.mdwn b/doc/tips/centralized_git_repository_tutorial/on_your_own_server.mdwn new file mode 100644 index 000000000..cc6bfbe28 --- /dev/null +++ b/doc/tips/centralized_git_repository_tutorial/on_your_own_server.mdwn @@ -0,0 +1,88 @@ +This tutorial shows how to set up a centralized git repository +hosted on your own git server, which can be any unix system with +ssh and git and git-annex installed. A VPS, a home server, etc. + +This sets up a very simple git server. More complex setups are possible. +See for example [[using_gitolite_with_git-annex]]. + +## set up the server + +On the server, you'll want to [[install]] git, and git-annex, if you haven't +already. + + server# sudo apt-get install git git-annex + +Decide where to put the repository on the server, and create a bare git repo +there. In your home directory is a simple choice: + + server# cd + server# git init annex.git --bare --shared + +That's the server setup done! + +## make a checkout + +Now on your laptop, clone the git repository from the server: + + laptop# git clone ssh://example.com/~/annex.git + Cloning into 'annex'... + warning: You appear to have cloned an empty repository. + Checking connectivity... done. + + +Tell git-annex to use the repository, and describe where this clone is +located: + + + laptop# cd annex + laptop# git annex init 'my laptop' + init my laptop ok + +## add files to the repository + +Add some files, obtained however. + + # git annex add *.mp4 + add Haskell_Amuse_Bouche-b9OVqxmI.mp4 (checksum) ok + (Recording state in git...) + # git commit -m "added a video. I have not watched it yet but it sounds interesting" + +Feel free to rename the files, etc, using normal git commands: + + # git mv Haskell_Amuse_Bouche-b9OVqxmI.mp4 Haskell_Amuse_Bouche.mp4 + # git commit -m 'better filenames' + +Now push your changes back to the central repository on your server. As +well as pushing the master branch, remember to push the git-annex branch, +which is used to track the file contents. + + # git push origin master git-annex + To git@github.com:joeyh/techtalks.git + * [new branch] master -> master + * [new branch] git-annex -> git-annex + +That push went fast, because it didn't upload large videos to the server. + +So, to finish up, tell git-annex to sync all the data in the repository +to your server: + + # git annex sync --content + ... + +## make more checkouts + +So far you have a central repository on your server, and a checkout on a laptop. +Let's make another checkout elsewhere. Clone the central repository as before. + + elsewhere# git clone ssh://example.com/~/annex.git + elsewhere# cd annex + +Notice that your clone does not have the contents of any of the files yet. +If you run `ls`, you'll see broken symlinks. It's easy to download them from +your server either by running `git annex sync --content`, or by asking +git-annex to download individual files: + + # git annex get Haskell_Amuse_Bouche.mp4 + get Haskell_Amuse_Bouche.mp4 (from origin...) + 12877824 2% 255.11kB/s 00:00 + ok diff --git a/doc/todo/Add___39__dir__39___option_to_addurl.mdwn b/doc/todo/Add___39__dir__39___option_to_addurl.mdwn index ccba47947..834b6309f 100644 --- a/doc/todo/Add___39__dir__39___option_to_addurl.mdwn +++ b/doc/todo/Add___39__dir__39___option_to_addurl.mdwn @@ -1 +1,4 @@ Is it possible to add a '--dir' option to addurl (or some other mechanic) to make git annex create the symlinks in the specified directory? + +> --prefix makes sense, and might as well also add --suffix. [[done]] +> --[[Joey]] diff --git a/doc/todo/Add___39__dir__39___option_to_addurl/comment_2_15a6571d57794c3f1268c7a064e05bef._comment b/doc/todo/Add___39__dir__39___option_to_addurl/comment_2_15a6571d57794c3f1268c7a064e05bef._comment new file mode 100644 index 000000000..95504b1b2 --- /dev/null +++ b/doc/todo/Add___39__dir__39___option_to_addurl/comment_2_15a6571d57794c3f1268c7a064e05bef._comment @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="CandyAngel" + subject="comment 2" + date="2015-07-21T12:11:45Z" + content=""" +I was hoping something like tar's *-C*, or unzip's *-d* options would be easy to implement, given that git-annex will already create required directories when using --pathdepth. As far as I can tell, you can't mix --file and --pathdepth.. I'd have to reimplemnt --pathdepth and the directory creation in my script, which while not a major problem in Perl (aside from reinventing a potentially inferior wheel), may be if someone is using shell scripting. + +Maybe this request can be more generalised to *--prefix*? + +Then people could use --prefix to either just prefix the filename or set a directory for it to be put into. I had a look at Command/AddUrl.hs to see how feasible that would be but I'm struggling to follow it (not knowing Haskell yet). + +In the meantime(?), I have made my script remember the original directory it was started in and it cd's about as needed. +"""]] diff --git a/doc/todo/Add___39__dir__39___option_to_addurl/comment_3_62601714648631a31dee366a5a2e8f44._comment b/doc/todo/Add___39__dir__39___option_to_addurl/comment_3_62601714648631a31dee366a5a2e8f44._comment new file mode 100644 index 000000000..d521008bc --- /dev/null +++ b/doc/todo/Add___39__dir__39___option_to_addurl/comment_3_62601714648631a31dee366a5a2e8f44._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="CandyAngel" + subject="comment 3" + date="2015-07-22T07:41:53Z" + content=""" +Yay! Awesome, thank you :) +"""]] |