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

How to do Contentful Login with no local web browser #37

Closed
cyberrodent opened this issue May 25, 2018 · 7 comments
Closed

How to do Contentful Login with no local web browser #37

cyberrodent opened this issue May 25, 2018 · 7 comments

Comments

@cyberrodent
Copy link

cyberrodent commented May 25, 2018

Expected Behavior

It seems not possible to set up contentful-cli access without a local web browser.

vm:~/development/Contentful] $ contentful login

A browser window will open where you will log in (or sign up if you don’t have an account), authorize this CLI tool and paste your CMA token here:

? Open a browser window now? No
Log in aborted by the user.

vm:~/development/Contentful] $ contentful login

A browser window will open where you will log in (or sign up if you don’t have an account), authorize this CLI tool and paste your CMA token here:

? Open a browser window now? Yes
? Paste your token here:

It says to paste in the CMA token but pasting in my CMA token doesn't have any effect -- I think its not really wanting the CMA token but rather some sort of oauth refresh token

Don't want to have to install X-windows and a browser just to run migrations.

@mashaal
Copy link

mashaal commented Jun 12, 2018

We experienced a similar issue -- on Windows, the login command closes after opening the browser window, not allowing entry of the authentication token.

We had to create a .contentfulrc.json file and manually paste the authentication token into it, allowing us to use the cli. This may work in your case as well @cyberrodent?

Here is how the .contentfulrc.json is formatted.

{
  "cmaToken": "xxx"
}

Being able to manually enter an authentication token via argument would be a great alternative.

@Khaledgarbaya
Copy link
Contributor

you can also contentful config add --management-token token check the config command

@phoebeschmidt
Copy link
Contributor

Closing due to inactivity. Feel free to open another issue if you have more problems.

@chpi6297
Copy link

chpi6297 commented May 2, 2019

you can also contentful config add --management-token token check the config command

I'm running contentful-cli from my dev mac. It manages to open a browser and authenticate and create token, but when I copy and paste the token into the terminal and hit enter key as instructed nothing happens. The config add method works still. I recently installed the cli tool.

@Marcelovv2
Copy link

This issue is still present on Windows 10 home PowerShell, I was able to log in within vs code terminal.

Can't paste here:
image

@Suvetha-C
Copy link

This issue is still present on Windows 10 home PowerShell, I was able to log in within vs code terminal.

Can't paste here:
image

i too have that same problem did u find any solution

@Marcelovv2
Copy link

@Suvetha-C yes for me it worked within the terminal of Visual Studio Code

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

7 participants