username/password case.
For cache to store change:
* By default, cache only last 900 seconds, gitsync will break after
that. See https://git-scm.com/docs/git-credential-cache.
* The test won't work with cache since the test don't have access to
the default unix socket location; XDG_CACHE_HOME override also can
pre-create a socket in advance.
* `store` put the credential into a file, much easier to debug than cache.
* Considering anyone have access to the pod already able to get the
credential via environment variables or yaml configs, so put it in
file won't make it less secure.
For the new password test:
1. askpass_git.sh provided to simulate a git with password challenge.
2. Need and only need to similate "clone" action, need to bypass other
actions like config/credential setup.
3. See `credential fill` is the official git action to ask password,
see https://git-scm.com/docs/git-credential.
This change resolved issue #196.
This handles non-annotated tags, which were not handled well before. It
does mean that we use the hash of the (annotated) tag object instead of
the commit, but that seems OK.
Added a test case.
If an initial clone crashes, it can leave the git-root in a bad state
such that git can't retry the clone. This change forces it to clean up
the mess and retry.
Change the use of pkill with 'docker rm' as this will work more reliably (at least on MacOS). Trap the EXIT signal so we can perform a clean-up even if a test fails, so we don't pollute the system with a bunch of stopped containers. Increase the timeout from two to three seconds in order for the tests to work reliably on MacOS (the two second waiting period was consistenly to short for all tests to work). Update the Makefile so when we run the container in order to compile the package we make sure the (stopped) container is removed.
Faster builds and versions from tags. Also use alpine as a base image. We
need alpine for other architectures...
Also change the --wait flag to take a float for sub-second waits.