Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$git_proxy in .gitconfig is ignored by vcsrepo git provider #240

Open
hypnotortoise opened this issue Dec 11, 2015 · 0 comments
Open

$git_proxy in .gitconfig is ignored by vcsrepo git provider #240

hypnotortoise opened this issue Dec 11, 2015 · 0 comments

Comments

@hypnotortoise
Copy link

Setting $git_proxy in the users git config file does not work for people who are required to use vcsrepo via proxyserver. The problem relates due to how Puppet/vcsrepo resets environment when calling Puppet::Util::Execution.execute(). I added some debug options to vcsrepos type class git.rb to see what is printed for git config -l. It misses the proxies unless they are directly specified in the repositories .git/config.

Tested with sbadia-gitlab v0.1.5 but I see that there were no changes in upstream regarding proxy setup.

Example failed run with debugging enabled, where $git_proxy was set correctly for .gitconfig:

Fri Dec 11 17:57:08 +0100 2015 Puppet (debug): Executing 'git config -l'
Fri Dec 11 17:57:08 +0100 2015 Vcsrepo[/srv/rubyapps/gitlab/gitlab-shell](provider=git) (debug): core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=https://github.com/gitlabhq/gitlab-shell.git
branch.master.remote=origin
branch.master.merge=refs/heads/master
...
Fri Dec 11 18:10:07 +0100 2015 Puppet (debug): Executing 'git fetch origin'
Fri Dec 11 18:11:10 +0100 2015 /Stage[main]/Gitlab::Ci::Package/Vcsrepo[/srv/rubyapps/gitlab/gitlab-shell] (err): Could not evaluate: Execution of 'git fetch origin' returned 128
...

WA was, to either use custom_environment execute() option in vcsrepos git.rb (bad) or specify proxies directly in .git/config gitlab-/ci & -shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant