X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7538d084fa8778289053f62a6fb8d3ea04868258..93e0931ea059355ffc26add1303a52f13d2964c9:/apps/workbench/app/models/repository.rb diff --git a/apps/workbench/app/models/repository.rb b/apps/workbench/app/models/repository.rb index b9b9ce3359..1caab89cc7 100644 --- a/apps/workbench/app/models/repository.rb +++ b/apps/workbench/app/models/repository.rb @@ -48,15 +48,6 @@ class Repository < ArvadosBase subtree end - # git 2.1.4 does not use credential helpers reliably, see #5416 - def self.disable_repository_browsing? - return false if Rails.configuration.use_git2_despite_bug_risk - if @buggy_git_version.nil? - @buggy_git_version = /git version 2/ =~ `git version` - end - @buggy_git_version - end - # http_fetch_url returns the first http:// or https:// url (if any) # in the api response's clone_urls attribute. def http_fetch_url @@ -96,7 +87,7 @@ class Repository < ArvadosBase "credential.#{http_fetch_url}.username", 'none'], ['git', '--git-dir', @workdir, 'config', '--local', "credential.#{http_fetch_url}.helper", - '!token(){ echo password="$ARVADOS_API_TOKEN"; }; token'], + '!cred(){ cat >/dev/null; if [ "$1" = get ]; then echo password=$ARVADOS_API_TOKEN; fi; };cred'], ['git', '--git-dir', @workdir, 'config', '--local', 'http.sslVerify', Rails.configuration.arvados_insecure_https ? 'false' : 'true'],