{"action":"created","comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/pulls/comments/22609566","id":22609566,"diff_hunk":"@@ -564,6 +565,11 @@ def push(name)\n           pushes: push_registry.keys\n       end\n \n+      # Validate the global push configuration and our local push configuration\n+      machine = self.machine(self.machine_names.first, self.default_provider)\n+      machine.action_raw(:config_validate, Vagrant::Action::Builtin::ConfigValidate)\n+      config.validate(machine)","path":"lib/vagrant/environment.rb","position":15,"original_position":15,"commit_id":"c4eb0261bbd845f6a7d118c418ec108a714c1fef","original_commit_id":"c4eb0261bbd845f6a7d118c418ec108a714c1fef","user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"body":"@mitchellh I looked that that, but there's no `vm` in our case, since this only depends on the environment, so that doesn't trigger (at least it wasn't in my tests). I'm not sure how this should all be wired together since the config validation logic is a bit confusing to me, but this is definitely the bug.","created_at":"2015-01-07T19:36:40Z","updated_at":"2015-01-07T19:36:40Z","html_url":"https://github.com/mitchellh/vagrant/pull/5130#discussion_r22609566","pull_request_url":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130","_links":{"self":{"href":"https://api.github.com/repos/mitchellh/vagrant/pulls/comments/22609566"},"html":{"href":"https://github.com/mitchellh/vagrant/pull/5130#discussion_r22609566"},"pull_request":{"href":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130"}}},"pull_request":{"url":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130","id":26976415,"html_url":"https://github.com/mitchellh/vagrant/pull/5130","diff_url":"https://github.com/mitchellh/vagrant/pull/5130.diff","patch_url":"https://github.com/mitchellh/vagrant/pull/5130.patch","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5130","number":5130,"state":"open","locked":false,"title":"Actually validate push configurations","user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"body":"In 5903bfb3c6f767f05ad9f1c4c6ef5237de039ea8, we added validation for global configuration, but that does not actually invoke the individual push validations. As a result, the push-specific configs were never validated. The tests did not catch this because they test at a lower level and manually call `#validate`.\r\n\r\nThis is the root cause of `vagrant push` with the Atlas strategy not choosing the login token, since the login token is actually [set during validation](https://github.com/mitchellh/vagrant/blob/42b7f13790c779671e472010ac988c3401efc593/plugins/pushes/atlas/config.rb#L87-L94) because we require access to the machine object.\r\n\r\nThis PR also adds much-needed logging to `vagrant-login`.\r\n\r\n/cc @mitchellh @pearkes ","created_at":"2015-01-07T18:23:47Z","updated_at":"2015-01-07T19:36:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee50679cdd3e40082c5f8d8ca046c32c1802d2c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130/commits","review_comments_url":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130/comments","review_comment_url":"https://api.github.com/repos/mitchellh/vagrant/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5130/comments","statuses_url":"https://api.github.com/repos/mitchellh/vagrant/statuses/c4eb0261bbd845f6a7d118c418ec108a714c1fef","head":{"label":"mitchellh:sethvargo/validate_pushes","ref":"sethvargo/validate_pushes","sha":"c4eb0261bbd845f6a7d118c418ec108a714c1fef","user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"repo":{"id":481872,"name":"vagrant","full_name":"mitchellh/vagrant","owner":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitchellh/vagrant","description":"Vagrant is a tool for building and distributing development environments.","fork":false,"url":"https://api.github.com/repos/mitchellh/vagrant","forks_url":"https://api.github.com/repos/mitchellh/vagrant/forks","keys_url":"https://api.github.com/repos/mitchellh/vagrant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitchellh/vagrant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitchellh/vagrant/teams","hooks_url":"https://api.github.com/repos/mitchellh/vagrant/hooks","issue_events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/events{/number}","events_url":"https://api.github.com/repos/mitchellh/vagrant/events","assignees_url":"https://api.github.com/repos/mitchellh/vagrant/assignees{/user}","branches_url":"https://api.github.com/repos/mitchellh/vagrant/branches{/branch}","tags_url":"https://api.github.com/repos/mitchellh/vagrant/tags","blobs_url":"https://api.github.com/repos/mitchellh/vagrant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitchellh/vagrant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitchellh/vagrant/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitchellh/vagrant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitchellh/vagrant/statuses/{sha}","languages_url":"https://api.github.com/repos/mitchellh/vagrant/languages","stargazers_url":"https://api.github.com/repos/mitchellh/vagrant/stargazers","contributors_url":"https://api.github.com/repos/mitchellh/vagrant/contributors","subscribers_url":"https://api.github.com/repos/mitchellh/vagrant/subscribers","subscription_url":"https://api.github.com/repos/mitchellh/vagrant/subscription","commits_url":"https://api.github.com/repos/mitchellh/vagrant/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitchellh/vagrant/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/{number}","contents_url":"https://api.github.com/repos/mitchellh/vagrant/contents/{+path}","compare_url":"https://api.github.com/repos/mitchellh/vagrant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitchellh/vagrant/merges","archive_url":"https://api.github.com/repos/mitchellh/vagrant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitchellh/vagrant/downloads","issues_url":"https://api.github.com/repos/mitchellh/vagrant/issues{/number}","pulls_url":"https://api.github.com/repos/mitchellh/vagrant/pulls{/number}","milestones_url":"https://api.github.com/repos/mitchellh/vagrant/milestones{/number}","notifications_url":"https://api.github.com/repos/mitchellh/vagrant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitchellh/vagrant/labels{/name}","releases_url":"https://api.github.com/repos/mitchellh/vagrant/releases{/id}","created_at":"2010-01-21T08:34:27Z","updated_at":"2015-01-07T11:01:59Z","pushed_at":"2015-01-07T18:20:56Z","git_url":"git://github.com/mitchellh/vagrant.git","ssh_url":"git@github.com:mitchellh/vagrant.git","clone_url":"https://github.com/mitchellh/vagrant.git","svn_url":"https://github.com/mitchellh/vagrant","homepage":"http://www.vagrantup.com","size":38307,"stargazers_count":8346,"watchers_count":8346,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1851,"mirror_url":null,"open_issues_count":266,"forks":1851,"open_issues":266,"watchers":8346,"default_branch":"master"}},"base":{"label":"mitchellh:master","ref":"master","sha":"42b7f13790c779671e472010ac988c3401efc593","user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"repo":{"id":481872,"name":"vagrant","full_name":"mitchellh/vagrant","owner":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitchellh/vagrant","description":"Vagrant is a tool for building and distributing development environments.","fork":false,"url":"https://api.github.com/repos/mitchellh/vagrant","forks_url":"https://api.github.com/repos/mitchellh/vagrant/forks","keys_url":"https://api.github.com/repos/mitchellh/vagrant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitchellh/vagrant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitchellh/vagrant/teams","hooks_url":"https://api.github.com/repos/mitchellh/vagrant/hooks","issue_events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/events{/number}","events_url":"https://api.github.com/repos/mitchellh/vagrant/events","assignees_url":"https://api.github.com/repos/mitchellh/vagrant/assignees{/user}","branches_url":"https://api.github.com/repos/mitchellh/vagrant/branches{/branch}","tags_url":"https://api.github.com/repos/mitchellh/vagrant/tags","blobs_url":"https://api.github.com/repos/mitchellh/vagrant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitchellh/vagrant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitchellh/vagrant/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitchellh/vagrant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitchellh/vagrant/statuses/{sha}","languages_url":"https://api.github.com/repos/mitchellh/vagrant/languages","stargazers_url":"https://api.github.com/repos/mitchellh/vagrant/stargazers","contributors_url":"https://api.github.com/repos/mitchellh/vagrant/contributors","subscribers_url":"https://api.github.com/repos/mitchellh/vagrant/subscribers","subscription_url":"https://api.github.com/repos/mitchellh/vagrant/subscription","commits_url":"https://api.github.com/repos/mitchellh/vagrant/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitchellh/vagrant/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/{number}","contents_url":"https://api.github.com/repos/mitchellh/vagrant/contents/{+path}","compare_url":"https://api.github.com/repos/mitchellh/vagrant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitchellh/vagrant/merges","archive_url":"https://api.github.com/repos/mitchellh/vagrant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitchellh/vagrant/downloads","issues_url":"https://api.github.com/repos/mitchellh/vagrant/issues{/number}","pulls_url":"https://api.github.com/repos/mitchellh/vagrant/pulls{/number}","milestones_url":"https://api.github.com/repos/mitchellh/vagrant/milestones{/number}","notifications_url":"https://api.github.com/repos/mitchellh/vagrant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitchellh/vagrant/labels{/name}","releases_url":"https://api.github.com/repos/mitchellh/vagrant/releases{/id}","created_at":"2010-01-21T08:34:27Z","updated_at":"2015-01-07T11:01:59Z","pushed_at":"2015-01-07T18:20:56Z","git_url":"git://github.com/mitchellh/vagrant.git","ssh_url":"git@github.com:mitchellh/vagrant.git","clone_url":"https://github.com/mitchellh/vagrant.git","svn_url":"https://github.com/mitchellh/vagrant","homepage":"http://www.vagrantup.com","size":38307,"stargazers_count":8346,"watchers_count":8346,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1851,"mirror_url":null,"open_issues_count":266,"forks":1851,"open_issues":266,"watchers":8346,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130"},"html":{"href":"https://github.com/mitchellh/vagrant/pull/5130"},"issue":{"href":"https://api.github.com/repos/mitchellh/vagrant/issues/5130"},"comments":{"href":"https://api.github.com/repos/mitchellh/vagrant/issues/5130/comments"},"review_comments":{"href":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130/comments"},"review_comment":{"href":"https://api.github.com/repos/mitchellh/vagrant/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mitchellh/vagrant/pulls/5130/commits"},"statuses":{"href":"https://api.github.com/repos/mitchellh/vagrant/statuses/c4eb0261bbd845f6a7d118c418ec108a714c1fef"}}}}