summaryrefslogtreecommitdiff
path: root/Annex/Ssh.hs
Commit message (Collapse)AuthorAge
* run ssh in the directory with its socket when stoppingGravatar Joey Hess2013-10-06
| | | | | | | | | | | This guarantees that stopping an existing socket never fails. This might be the route out of the mess of needing to worry about socket lengths in general. However, it would need quite a lot of refactoring to make every place in git-annex that runs ssh run it with a cwd that was determined by the location of its connection caching socket. If this wasn't already such a mess, I'd consider even the thought of that API a bad idea..
* work around ssh brain-damangeGravatar Joey Hess2013-10-06
| | | | | | | | | | | | | The control socket path passed to ssh needs to be 17 characters shorter than the maximum unix domain socket length, because ssh appends stuff to it to make a temporary filename. Closes: #725512 Also, take the shorter of the relative and the absolute paths to the socket. Typically the relative path will be a lot shorter (unless deep inside a subdirectory of the repository), and so using it will avoid flirting with the maximum safe socket lenghts in more situations, and so lead to less breakage if all my attempts at fixing this are still buggy.
* hlintGravatar Joey Hess2013-09-25
| | | | test suite still passes
* squash compiler warnings on WindowsGravatar Joey Hess2013-08-04
|
* get rid of __WINDOWS__, use mingw32_HOST_OSGravatar Joey Hess2013-08-02
| | | | | The latter is harder for me to remember, but avoids build failures in code used by the configure program.
* For long hostnames, use a hash of the hostname to generate the socket file ↵Gravatar Joey Hess2013-07-22
| | | | | | | | | | | for ssh connection caching. This is ok to do now that the socket filename never needs to be mapped back to a hostname. Short hostnames will still appear in the clear, which is less obfuscated. So this cannot possibly make ssh connection caching fail for a hostname it used to work for.
* stop cached ssh connection w/o needing to look up host and portGravatar Joey Hess2013-07-21
| | | | | | | | Turns out that with -O stop -S socketfile, ssh does not need the real hostname, or port to be specificed. This is because it simply talks to the ssh behind the socket and tells it to stop. So, can eliminate the conversion back from a socketfile to host and port. Which will allow using shorter filenames for sockets in the future.
* Revert "Windows: Ssh connection caching is now supported."Gravatar Joey Hess2013-06-17
| | | | | | Yeah, that didn't actually work. Got error messages like it couldn't read from the control socket, so probably ssh doesn't really support that on Windows, at least the cygwin ssh build I'm using.
* Windows: Ssh connection caching is now supported.Gravatar Joey Hess2013-06-17
| | | | Turns out the socket stuff just works on windows.
* fix importsGravatar Joey Hess2013-05-14
|
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* clean up from windows portingGravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* stub out POSIX stuffGravatar Joey Hess2013-05-10
|
* Allow rsync to use other remote shells.Gravatar guilhem2013-04-13
| | | | | | Introduced a new per-remote option 'annex-rsync-transport' to specify the remote shell that it to be used with rsync. In case the value is 'ssh', connections are cached unless 'sshcaching' is unset.
* hlintGravatar Joey Hess2013-04-03
|
* Run ssh with -T to avoid tty allocation and any login scripts that may do ↵Gravatar Joey Hess2013-03-04
| | | | undesired things with it.
* squelch warningGravatar Joey Hess2013-02-22
|
* shorter directory to external ssh socketGravatar Joey Hess2013-02-19
| | | | Before it was too long to be used.
* Android: Support ssh connection caching.Gravatar Joey Hess2013-02-19
|
* type based git config handling for remotesGravatar Joey Hess2013-01-01
| | | | | Still a couple of places that use git config ad-hoc, but this is most of it done.
* type based git config handlingGravatar Joey Hess2012-12-29
| | | | | | | | | | | Now there's a Config type, that's extracted from the git config at startup. Note that laziness means that individual config values are only looked up and parsed on demand, and so we get implicit memoization for all of them. So this is not only prettier and more type safe, it optimises several places that didn't have explicit memoization before. As well as getting rid of the ugly explicit memoization code. Not yet done for annex.<remote>.* configuration settings.
* finished where indentation changesGravatar Joey Hess2012-12-13
|
* squelch warningGravatar Joey Hess2012-11-26
|
* rsync special remote: Include annex-rsync-options when running rsync to test ↵Gravatar Joey Hess2012-10-28
| | | | | | | a key's presence. Also, use the new withQuietOutput function to avoid running the shell to /dev/null stderr in two other places.
* disable ssh connection caching for standalone buildsGravatar Joey Hess2012-10-15
| | | | | | | | | | | | The standalone build does not bundle its own ssh, so should be built to support as wide an array of ssh versions as possible, so turn off connection caching. Unfortunatly, as implemented this forces a full rebuild when building the standalone binary, and of course it makes it somewhat slower. This is not ideal, but neither is probing the ssh version every time it's run (slow), or once when initializing a repo (fragile).
* flip catchDefaultIOGravatar Joey Hess2012-09-17
|
* Disable ssh connection caching if the path to the control socket would be ↵Gravatar Joey Hess2012-09-13
| | | | too long (and use relative path to minimise path to the control socket).
* Clean up handling of git directory and git worktree.Gravatar Joey Hess2012-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baked into the code was an assumption that a repository's git directory could be determined by adding ".git" to its work tree (or nothing for bare repos). That fails when core.worktree, or GIT_DIR and GIT_WORK_TREE are used to separate the two. This was attacked at the type level, by storing the gitdir and worktree separately, so Nothing for the worktree means a bare repo. A complication arose because we don't learn where a repository is bare until its configuration is read. So another Location type handles repositories that have not had their config read yet. I am not entirely happy with this being a Location type, rather than representing them entirely separate from the Git type. The new code is not worse than the old, but better types could enforce more safety. Added support for core.worktree. Overriding it with -c isn't supported because it's not really clear what to do if a git repo's config is read, is not bare, and is then overridden to bare. What is the right git directory in this case? I will worry about this if/when someone has a use case for overriding core.worktree with -c. (See Git.Config.updateLocation) Also removed and renamed some functions like gitDir and workTree that misused git's terminology. One minor regression is known: git annex add in a bare repository does not print a nice error message, but runs git ls-files in a way that fails earlier with a less nice error message. This is because before --work-tree was always passed to git commands, even in a bare repo, while now it's not.
* Fix use of several config settingsGravatar Joey Hess2012-05-05
| | | | | | | annex.ssh-options, annex.rsync-options, annex.bup-split-options. And adjust types to avoid the bugs that broke several config settings recently. Now "annex." prefixing is enforced at the type level.
* noopGravatar Joey Hess2012-04-21
|
* in which I discover voidGravatar Joey Hess2012-04-21
| | | | void :: Functor f => f a -> f () -- ah, of course that's useful :)
* honor core.sharedRepository when making all the other files in the annexGravatar Joey Hess2012-04-21
| | | | Lock files, directories, etc.
* use new getConfigGravatar Joey Hess2012-03-22
|
* added ifM and nuked 11 lines of codeGravatar Joey Hess2012-03-14
| | | | no behavior changes
* syscall optimisationGravatar Joey Hess2012-03-06
|
* configure: Check if ssh connection caching is supported by the installed ↵Gravatar Joey Hess2012-02-25
| | | | version of ssh and default annex.sshcaching accordingly.
* hlintGravatar Joey Hess2012-02-16
|
* Fix teardown of stale cached ssh connections.Gravatar Joey Hess2012-02-09
|
* IO exception reworkGravatar Joey Hess2012-02-03
| | | | | | ghc 7.4 comaplains about use of System.IO.Error to catch exceptions. Ok, use Control.Exception, with variants specialized to only catch IO exceptions.
* rename readMaybe to readishGravatar Joey Hess2012-01-23
| | | | a stricter (but also partial) readMaybe is getting added to base
* order user provided params after connection caching paramsGravatar Joey Hess2012-01-20
| | | | So the user can override them.
* add annex.sshcaching config settingGravatar Joey Hess2012-01-20
|
* ssh connection cachingGravatar Joey Hess2012-01-20
| | | | | | | | | | | Ssh connection caching is now enabled automatically by git-annex. Only one ssh connection is made to each host per git-annex run, which can speed some things up a lot, as well as avoiding repeated password prompts. Concurrent git-annex processes also share ssh connections. Cached ssh connections are shut down when git-annex exits. Note: The rsync special remote does not yet participate in the ssh connection caching.
* reorgGravatar Joey Hess2012-01-10
|
* use Common in a few more modulesGravatar Joey Hess2011-12-20
|
* split more stuff out of Git.hsGravatar Joey Hess2011-12-14
|
* hslintGravatar Joey Hess2011-12-09
|
* add a UUID typeGravatar Joey Hess2011-11-07
| | | | Should have done this a long time ago.