Project

General

Profile

Feature #6619

Updated by Tom Clegg almost 9 years ago

Git can be configured to use the ARVADOS_API_TOKEN environment variable to authenticate to gitolite. A single-user setup would look like this: 
 * <pre> 
 git config 'credential.https://git.zzzzz.arvadosapi.com/.username' 'credential.http://git.zzzzz.arvaodsapi.com/.username' none 
 git config 'credential.https://git.zzzzz.arvadosapi.com/.helper' 'credential.http://git.zzzzz.arvaodsapi.com/.helper' \ 
  '!cred(){ cat >/dev/null; if [ "$1" = get ]; then echo password=$ARVADOS_API_TOKEN; fi; };cred' 
 </pre> 
 * See source:services/arv-git-httpd/server_test.go#L77 for a working example used in the test suite. 

 (The literal username "none" is for real. It's just a placeholder; the arv-git-httpd server ignores it.) 

 This should be enabled by default on all shell VMs by running @git config --system ...@, installing a @/etc/gitconfig@ with puppet, or [...]. 

 This setup should also be documented at http://doc.arvados.org/install/install-shell-server.html 

Back