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

"ddev auth-pantheon {token}" returns "no such file or directory" error #806

Closed
texvetadmin opened this issue Apr 24, 2018 · 8 comments
Closed
Assignees
Milestone

Comments

@texvetadmin
Copy link

texvetadmin commented Apr 24, 2018

Howdy! I just used homebrew to install ddev per the instructions at https://ddev.readthedocs.io/en/latest/#installation. Then I started following the instructions to pull from Pantheon at: https://ddev.readthedocs.io/en/latest/users/providers/pantheon/#quick-start

I've created a valid Pantheon authentication token for ddev. When I run ddev auth-pantheon MYTOKEN, (where MYTOKEN is the authentication token I copy-and-pasted from Pantheon) I get the following error:

Failed session.Write(), err=open /Users/jonathanleistiko/.ddev/pantheonconfig.json: no such file or directory

"/Users/jonathanleistiko/" is my home directory on my local machine. I checked and it does not have a .ddev directory in it.

It looks like ddev can't create the directory and file it needs to complete this task; that seems weird to me, though. I feel like I must be missing something ultra-obvious, but I haven't found a thing in all the Googling I've done. I'd appreciate any guidance y'all can provide. Thanks!

What you expected to happen:

ddev would use the authentication token to successfully authenticate with Pantheon.

How to reproduce this:

I've tried several variants of the "auth-pantheon" command with the following results...

TexVet-Leistiko-iMac:~ jonathanleistiko$ ddev auth-pantheon
You must provide a Pantheon machine token, e.g. 'ddev auth-pantheon [token]'. See https://pantheon.io/docs/machine-tokens/ for instructions on creating a token. 
TexVet-Leistiko-iMac:~ jonathanleistiko$ ddev auth-pantheon [*VALID*TOKEN*REDACTED*]
Could not authenticate with pantheon: 401 Unauthorized: 401 
TexVet-Leistiko-iMac:~ jonathanleistiko$ ddev auth-pantheon *VALID*TOKEN*REDACTED*
Failed session.Write(), err=open /Users/jonathanleistiko/.ddev/pantheonconfig.json: no such file or directory

Version:

Mac OS 10.13.4

TexVet-Leistiko-iMac:~ jonathanleistiko$ ddev version
commit v0.17.0
domain ddev.local
cli v0.17.0
web drud/nginx-php-fpm-local:v1.2.2
db drud/mariadb-local:v0.9.0
dba drud/phpmyadmin:v0.2.0
router drud/ddev-router:v0.5.0

TexVet-Leistiko-iMac:~ jonathanleistiko$ docker version
Client:
Version: 18.03.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:06:22 2018
OS/Arch: darwin/amd64
Experimental: false
Orchestrator: swarm

Server:
Engine:
Version: 18.03.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:14:32 2018
OS/Arch: linux/amd64
Experimental: true

Complexity Rating: 1

@rfay
Copy link
Member

rfay commented Apr 24, 2018

Thanks for pointing this out. I imagine this was the first project you'd done, and the first use of ddev, so a good lesson. I imagine you created ~/.ddev and it all started working? If that's not the case, could you please give the output of ls -ld ~/ and id ?

@texvetadmin
Copy link
Author

Hi rfay,

You're correct; this is the first project I've done. (This is the first time I've set up a local dev environment!) I have not created ~/.ddev yet, 'cause I didn't want to screw anything up. I will do so and report back with results.

@rfay
Copy link
Member

rfay commented Apr 24, 2018

You shouldn't have had to create it of course, ddev should have. But if it's permission trouble then ddev can't solve it. Probably a good idea to give us the ls -ld ~/ and id anyway, thanks!

@rfay
Copy link
Member

rfay commented Apr 24, 2018

Never mind, I can easily recreate this, we'll fix it. In the meantime, just mkdir ~/.ddev and all will be well.

@texvetadmin
Copy link
Author

FWIW: Creating the .ddev directory fixed the issue. Thanks for the help!

@rickmanelius
Copy link
Contributor

Nice! Not sure if this is worth posting over to Stackoverflow. Closing out...

@beeradb
Copy link
Contributor

beeradb commented Apr 24, 2018

Seems like this is still a valid bug report with a fairly easy fix. I'd suggest we reopen it and do a check for that directory when authing.

@beeradb beeradb reopened this Apr 24, 2018
@rfay
Copy link
Member

rfay commented Apr 24, 2018

Yeah, this is our job to fix.

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

6 participants