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

Vagrant push with Atlas strategy not working #4968

Closed
kramos opened this Issue Dec 14, 2014 · 28 comments

Comments

Projects
None yet
@kramos

kramos commented Dec 14, 2014

Working on Windows 7 Enterprise. Looking to try Atlas but getting:

$ vagrant push
error starting upload: upload: resource not found
$ cat Vagrantfile
Vagrant.configure(2) do |config|
   config.vm.box = "ubuntu/trusty64"

   config.push.define "atlas" do |push|
     push.app = "Markosrendell/atlas_test1"
   end
end
$ ls -a
.  ..  .git  .vagrant  Vagrantfile  Vagrantfile~
$ vagrant -v
Vagrant 1.7.1

I'm probably doing something stupid, but I thought it might be worth raising and getting the solution added to the wiki,

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 14, 2014

Contributor

Hi @kramos I am sorry you're having issues with Vagrant push. Have you authenticated with Atlas via vagrant login?

Contributor

sethvargo commented Dec 14, 2014

Hi @kramos I am sorry you're having issues with Vagrant push. Have you authenticated with Atlas via vagrant login?

@mitchellh mitchellh added bug waiting-reply core and removed bug labels Dec 14, 2014

@kramos

This comment has been minimized.

Show comment
Hide comment
@kramos

kramos Dec 15, 2014

Hi @sethvargo thanks for the suggestion. Unfortunately this doesn't seem to help:

$ vagrant login -c
You are already logged in.

$ vagrant push
error starting upload: upload: resource not found

I had a grep in source code and since I noticed push.rb in the plugins folder, I tried:

$ vagrant plugin list
vagrant-share (1.1.4, system)

$ vagrant plugin update
Updating installed plugins...
All plugins are up to date.

So no luck there.

Just realised you can "vagrant up" on the vagrant source code #dogfood :)

kramos commented Dec 15, 2014

Hi @sethvargo thanks for the suggestion. Unfortunately this doesn't seem to help:

$ vagrant login -c
You are already logged in.

$ vagrant push
error starting upload: upload: resource not found

I had a grep in source code and since I noticed push.rb in the plugins folder, I tried:

$ vagrant plugin list
vagrant-share (1.1.4, system)

$ vagrant plugin update
Updating installed plugins...
All plugins are up to date.

So no luck there.

Just realised you can "vagrant up" on the vagrant source code #dogfood :)

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

@kramos this is probably a Windows bug /cc @mitchellh 😦

Contributor

sethvargo commented Dec 15, 2014

@kramos this is probably a Windows bug /cc @mitchellh 😦

@glongman

This comment has been minimized.

Show comment
Hide comment
@glongman

glongman Dec 15, 2014

on OSX 10.10 here and I have the same problem

on OSX 10.10 here and I have the same problem

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

Hi @glongman,

What version of Vagrant? How did you install Vagrant?

Contributor

sethvargo commented Dec 15, 2014

Hi @glongman,

What version of Vagrant? How did you install Vagrant?

@glongman

This comment has been minimized.

Show comment
Hide comment
@glongman

glongman Dec 15, 2014

14:25 ~/Projects/atlas_example/getting-started/app (master)$ vagrant --version
Vagrant 1.7.1

installed today via dmg from vagrantup

14:25 ~/Projects/atlas_example/getting-started/app (master)$ vagrant --version
Vagrant 1.7.1

installed today via dmg from vagrantup

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

@glongman can you show the output of:

env | grep -i atlas

As well as confirm the file ~/.vagrant.d/data/vagrant_login_token exists on disk and has content (please do not post the content here - it's an access token).

Contributor

sethvargo commented Dec 15, 2014

@glongman can you show the output of:

env | grep -i atlas

As well as confirm the file ~/.vagrant.d/data/vagrant_login_token exists on disk and has content (please do not post the content here - it's an access token).

@glongman

This comment has been minimized.

Show comment
Hide comment
@glongman

glongman Dec 15, 2014

14:27 ~/Projects/atlas_example/getting-started/app (master)$ env | grep -i atlas
OLDPWD=/Users/glongman/Projects/atlas_example
PWD=/Users/glongman/Projects/atlas_example/getting-started/app

~/.vagrant.d/data/vagrant_login_token

14:27 ~/Projects/atlas_example/getting-started/app (master)$ env | grep -i atlas
OLDPWD=/Users/glongman/Projects/atlas_example
PWD=/Users/glongman/Projects/atlas_example/getting-started/app

~/.vagrant.d/data/vagrant_login_token

@glongman

This comment has been minimized.

Show comment
Hide comment
@glongman

glongman Dec 15, 2014

exists and has content

exists and has content

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

@glongman can you confirm that the contents of that file correspond to a token listed on https://atlas.hashicorp.com/settings/tokens

Contributor

sethvargo commented Dec 15, 2014

@glongman can you confirm that the contents of that file correspond to a token listed on https://atlas.hashicorp.com/settings/tokens

@glongman

This comment has been minimized.

Show comment
Hide comment
@glongman

glongman Dec 15, 2014

yes I see a match there.

yes I see a match there.

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

@glongman okay. To prevent accidentally leaking access tokens, can you please run Vagrant in debug mode and Gist the output to a private gist and email it to me (support@hashicorp.com).

Contributor

sethvargo commented Dec 15, 2014

@glongman okay. To prevent accidentally leaking access tokens, can you please run Vagrant in debug mode and Gist the output to a private gist and email it to me (support@hashicorp.com).

@glongman

This comment has been minimized.

Show comment
Hide comment
@glongman

glongman Dec 15, 2014

captured and sent!

captured and sent!

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Dec 15, 2014

Contributor

Awesome, thanks!

Contributor

sethvargo commented Dec 15, 2014

Awesome, thanks!

@ml

This comment has been minimized.

Show comment
Hide comment
@ml

ml Dec 24, 2014

Same here, my token from cat ~/.vagrant.d/data/vagrant_login_token matches one from https://atlas.hashicorp.com/settings/tokens but I still can't push - keep getting $ vagrant push error starting upload: upload: resource not found.

I'm sending vagrant --debug push output to support@hashicorp.com.

ml commented Dec 24, 2014

Same here, my token from cat ~/.vagrant.d/data/vagrant_login_token matches one from https://atlas.hashicorp.com/settings/tokens but I still can't push - keep getting $ vagrant push error starting upload: upload: resource not found.

I'm sending vagrant --debug push output to support@hashicorp.com.

@david-sackmary

This comment has been minimized.

Show comment
Hide comment
@david-sackmary

david-sackmary Jan 6, 2015

I have the same error (and tokens match and all else above). I'm running a Centos6.5 VM :
centos$ vagrant push
error starting upload: upload: resource not found

I have the same error (and tokens match and all else above). I'm running a Centos6.5 VM :
centos$ vagrant push
error starting upload: upload: resource not found

@pires

This comment has been minimized.

Show comment
Hide comment
@pires

pires Jan 9, 2015

Same thing on MacOS 10.10.

pires commented Jan 9, 2015

Same thing on MacOS 10.10.

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Jan 9, 2015

Contributor

Hi there,

We have isolated and fixed the root cause of this bug on master. To get around this problem (until the next release of Vagrant), add the following to your shellrc file:

export ATLAS_TOKEN=`cat ~/.vagrant.d/data/vagrant_login_token`

Or set that environment variable to a valid access token created via the Atlas Web UI.

Contributor

sethvargo commented Jan 9, 2015

Hi there,

We have isolated and fixed the root cause of this bug on master. To get around this problem (until the next release of Vagrant), add the following to your shellrc file:

export ATLAS_TOKEN=`cat ~/.vagrant.d/data/vagrant_login_token`

Or set that environment variable to a valid access token created via the Atlas Web UI.

@sethvargo sethvargo closed this Jan 9, 2015

@pires

This comment has been minimized.

Show comment
Hide comment
@pires

pires Jan 9, 2015

I can confirm this fixes it.

pires commented Jan 9, 2015

I can confirm this fixes it.

@david-sackmary

This comment has been minimized.

Show comment
Hide comment
@david-sackmary

david-sackmary Jan 10, 2015

I also confirm this fixes it.

I also confirm this fixes it.

@ml

This comment has been minimized.

Show comment
Hide comment
@ml

ml Jan 10, 2015

The fix works for me too, but it'd be nice to mention this in vagrant docs or display an error message from vagrant push saying that ATLAS_TOKEN is not defined.

ml commented Jan 10, 2015

The fix works for me too, but it'd be nice to mention this in vagrant docs or display an error message from vagrant push saying that ATLAS_TOKEN is not defined.

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Jan 10, 2015

Contributor

@ml we have fixed this on master correctly, so it will be automatic in the next release

Contributor

sethvargo commented Jan 10, 2015

@ml we have fixed this on master correctly, so it will be automatic in the next release

@hyperfocus1337

This comment has been minimized.

Show comment
Hide comment
@hyperfocus1337

hyperfocus1337 Jan 17, 2015

I have added this to my .profile in my user directory on Mac OSX 10.10 and it fixes the issue. Remove it after updating Vagrant to the latest version? Will it cause any trouble?

I have added this to my .profile in my user directory on Mac OSX 10.10 and it fixes the issue. Remove it after updating Vagrant to the latest version? Will it cause any trouble?

@sethvargo

This comment has been minimized.

Show comment
Hide comment
@sethvargo

sethvargo Jan 17, 2015

Contributor

@hyperfocus1337 yea - this has been fixed in master and will be released with the next version of Vagrant. However, other Atlas products obey the ATLAS_TOKEN environment variable, so there is no harm having it set (like Packer and Terraform).

Contributor

sethvargo commented Jan 17, 2015

@hyperfocus1337 yea - this has been fixed in master and will be released with the next version of Vagrant. However, other Atlas products obey the ATLAS_TOKEN environment variable, so there is no harm having it set (like Packer and Terraform).

@dolanor

This comment has been minimized.

Show comment
Hide comment
@dolanor

dolanor Feb 4, 2016

I had this bug just today, and using the ATLAS_TOKEN fixed the upload.

OS: ubuntu 14.04
vagrant: 1.8.1

dolanor commented Feb 4, 2016

I had this bug just today, and using the ATLAS_TOKEN fixed the upload.

OS: ubuntu 14.04
vagrant: 1.8.1

@gokhansengun

This comment has been minimized.

Show comment
Hide comment
@gokhansengun

gokhansengun Nov 21, 2016

Contributor

Must be a regression here. Same issue and same workaround solves it.

OS: macOS Sierra 10.12.1 (16B2555)
Vagrant 1.8.7

Contributor

gokhansengun commented Nov 21, 2016

Must be a regression here. Same issue and same workaround solves it.

OS: macOS Sierra 10.12.1 (16B2555)
Vagrant 1.8.7

@johnypony3

This comment has been minimized.

Show comment
Hide comment
@johnypony3

johnypony3 Dec 7, 2016

for me it was that the organization was not created in atlas.
i.e.: {{org}}/{{artifact}}
{{org}} has to be setup, by default only the username is setup.

for me it was that the organization was not created in atlas.
i.e.: {{org}}/{{artifact}}
{{org}} has to be setup, by default only the username is setup.

@mcandre

This comment has been minimized.

Show comment
Hide comment
@mcandre

mcandre Dec 12, 2016

Contributor

Can vagrant login be updated to integrate better with vagrant push? These seem to have grown apart, especially with the de facto Atlas push strategy.

Out of the box, vagrant login && vagrant push fails due to:

  • No longer informing the push with the traditional ~/.vagrant.d/data/vagrant_login_token credentials file.
  • Implicitly requiring that an ATLAS_TOKEN environment variable be set.

As a workaround, users have suggested configuring shell snippets like:

export ATLAS_TOKEN="$(cat "$HOME/.vagrant.d/data/vagrant_login_token")"

Though vagrant push then complains of a conflict between ~/.vagrant.d/data/vagrant_login_token-defined and $ATLAS_TOKEN-defined credentials. This is particularly frustrating, as I'm not aware of a way of reliably and securely assigning $ATLAS_TOKEN without relying on vagrant login generating ~/.vagrant.d/data/vagrant_login_token.

Could we please fix the toolset so that login and push work better together?

Contributor

mcandre commented Dec 12, 2016

Can vagrant login be updated to integrate better with vagrant push? These seem to have grown apart, especially with the de facto Atlas push strategy.

Out of the box, vagrant login && vagrant push fails due to:

  • No longer informing the push with the traditional ~/.vagrant.d/data/vagrant_login_token credentials file.
  • Implicitly requiring that an ATLAS_TOKEN environment variable be set.

As a workaround, users have suggested configuring shell snippets like:

export ATLAS_TOKEN="$(cat "$HOME/.vagrant.d/data/vagrant_login_token")"

Though vagrant push then complains of a conflict between ~/.vagrant.d/data/vagrant_login_token-defined and $ATLAS_TOKEN-defined credentials. This is particularly frustrating, as I'm not aware of a way of reliably and securely assigning $ATLAS_TOKEN without relying on vagrant login generating ~/.vagrant.d/data/vagrant_login_token.

Could we please fix the toolset so that login and push work better together?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment