{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4912","repository_url":"https://api.github.com/repos/CocoaPods/CocoaPods","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4912/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4912/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4912/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/4912","id":134656813,"number":4912,"title":"`bundle exec pod install` via boxen fails to find credentials","user":{"login":"notjosh","id":33126,"avatar_url":"https://avatars.githubusercontent.com/u/33126?v=3","gravatar_id":"","url":"https://api.github.com/users/notjosh","html_url":"https://github.com/notjosh","followers_url":"https://api.github.com/users/notjosh/followers","following_url":"https://api.github.com/users/notjosh/following{/other_user}","gists_url":"https://api.github.com/users/notjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/notjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notjosh/subscriptions","organizations_url":"https://api.github.com/users/notjosh/orgs","repos_url":"https://api.github.com/users/notjosh/repos","events_url":"https://api.github.com/users/notjosh/events{/privacy}","received_events_url":"https://api.github.com/users/notjosh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-18T18:27:09Z","updated_at":"2016-02-19T13:43:27Z","closed_at":null,"body":"Hi!\r\n\r\n1) I'm using `cocoapods (0.39.0)`\r\n1) My system setup uses [boxen](https://github.com/boxen/our-boxen), which has a [credential manager](https://github.com/boxen/our-boxen/blob/master/script/boxen-git-credential)\r\n1) Our project has a private podspec repo (hosted on github.com), which the `Podfile` refers to as a source (so, requires auth via `boxen-git-credential`)\r\n\r\n`pod install` works completely fine, but `bundle exec pod install` fails with:\r\n\r\n```\r\n$ bundle exec pod install --verbose\r\n  Preparing\r\n\r\nUpdating local specs repositories\r\n\r\nUpdating spec repo `biowink`\r\n  $ /opt/boxen/homebrew/bin/git pull --ff-only\r\n  /opt/boxen/bin/boxen-git-credential:29:in `require': cannot load such file -- boxen/config (LoadError)\r\n  \tfrom /opt/boxen/bin/boxen-git-credential:29:in `<main>'\r\nUsername for 'https://github.com':\r\n```\r\n\r\nThere's a ~fix~ for this, but I don't know the greater impacts, so I won't send a PR just yet. But basically, in `executable.rb` you can wrap shell calls in `Bundler.with_clean_env { ... }` and it :sparkles:works:sparkles: just fine. That seems to be the recommended approach according to https://github.com/boxen/our-boxen/issues/25, and there's a precedent in Octopress at https://github.com/imathis/octopress/commit/00d15913220b25ebe55c581d557069d6833cf44b.\r\n\r\nBUT, after that, running `pod install` directly (without `bundle exec`) causes ~problems~ (`NameError - uninitialized constant Pod::Executable::Bundler`) and I don't know the best way to work around that. Check for bundler gem, check for bundler ENV, and wrap calls if it looks like we're in a bundler env? Maybe there's a better way :)\r\n\r\nI'm happy to fire off a PR, just need some advice.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/186217261","html_url":"https://github.com/CocoaPods/CocoaPods/issues/4912#issuecomment-186217261","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4912","id":186217261,"user":{"login":"segiddins","id":1946610,"avatar_url":"https://avatars.githubusercontent.com/u/1946610?v=3","gravatar_id":"","url":"https://api.github.com/users/segiddins","html_url":"https://github.com/segiddins","followers_url":"https://api.github.com/users/segiddins/followers","following_url":"https://api.github.com/users/segiddins/following{/other_user}","gists_url":"https://api.github.com/users/segiddins/gists{/gist_id}","starred_url":"https://api.github.com/users/segiddins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segiddins/subscriptions","organizations_url":"https://api.github.com/users/segiddins/orgs","repos_url":"https://api.github.com/users/segiddins/repos","events_url":"https://api.github.com/users/segiddins/events{/privacy}","received_events_url":"https://api.github.com/users/segiddins/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T13:43:27Z","updated_at":"2016-02-19T13:43:27Z","body":"But the issue with that is users might _want_ their ewxecutables to be found using the gems in their gemfile. "}}