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

terraform login doesn't accept copy paste token on Windows 10 #25923

Closed
smartops-main opened this issue Aug 19, 2020 · 5 comments
Closed

terraform login doesn't accept copy paste token on Windows 10 #25923

smartops-main opened this issue Aug 19, 2020 · 5 comments
Labels
bug v0.13 Issues (primarily bugs) reported against v0.13 releases windows working as designed confirmed as reported and closed because the behavior is intended

Comments

@smartops-main
Copy link

Version 0.13, windows 10x64

Expected Behavior

What should have happened?

  • terraform login
  • go through process of creating token on website
  • copy token / verify can paste in other app
  • tf app should accept paste Ctrl-V of token and authenticate the session

Actual Behavior

  • terraform login
  • enter Yes to create token
  • go through process of creating token on website
  • copy token / verify can paste in other app
  • ctrl-V in windows command line terminal results in nothing happening at terraform prompt
  • in fact, i can't even type anything at the prompt to paste/enter the token

Steps to Reproduce

  • terraform login
  • enter YES
  • generate token on website, copy it
  • attempt to paste
  • nothing happens

Additional Context

This is the prompt where it gets hung after I create and attempt to paste a token


Terraform must now open a web browser to the tokens page for app.terraform.io.

If a browser does not open this automatically, open the following URL to proceed:
https://app.terraform.io/app/settings/tokens?source=terraform-login


Generate a token using your browser, and copy-paste it into this prompt.

Terraform will store the token in plain text in the following file
for use by subsequent commands:
C:\Users\dev\AppData\Roaming\terraform.d\credentials.tfrc.json

Token for app.terraform.io:
Enter a value:

@smartops-main smartops-main added bug new new issue not yet triaged labels Aug 19, 2020
@alisdair
Copy link
Member

I can't reproduce this problem on Windows 10, either using Powershell or cmd.exe.

  • Could it be a generic problem with copy & paste and your command prompt?
  • Can you copy & paste any other text into the command prompt, without using Terraform?
  • Have you tried using the menu to paste? If you type Alt-Space E P it should work

@alisdair alisdair added waiting for reproduction unable to reproduce issue without further information waiting-response An issue/pull request is waiting for a response from the community v0.13 Issues (primarily bugs) reported against v0.13 releases windows and removed new new issue not yet triaged labels Aug 19, 2020
@smartops-main
Copy link
Author

I've tried a few more times and still get same result. So I can reproduce.

And, before I enter the TF login command I can paste into the terminal. And when I exit the TF login command I can again paste into the terminal. But, while the command is running, I can't keystroke paste or File menu - Edit - Paste into the TF prompt.

Maybe I should try a different terminal for Win10 to use with TF? I'm just using cmd.exe currently. Do I need elevated privileges or anything else I should know before I try to start using TF on windows?

@ghost ghost removed waiting-response An issue/pull request is waiting for a response from the community labels Aug 20, 2020
@alisdair
Copy link
Member

One final thing that may not be clear: when you paste into the password prompt, echo is disabled for security reasons, so it will appear that you are not pasting anything. You need to paste the token from Terraform Cloud, which will display nothing, then hit enter. Terraform will then verify that the token is valid before saving it.

Can you try that and report back please?

@smartops-main
Copy link
Author

LOL that's it. First time using TF so clearly this was user error. Thanks!!!

@alisdair alisdair added working as designed confirmed as reported and closed because the behavior is intended and removed waiting for reproduction unable to reproduce issue without further information labels Aug 20, 2020
@ghost
Copy link

ghost commented Oct 11, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug v0.13 Issues (primarily bugs) reported against v0.13 releases windows working as designed confirmed as reported and closed because the behavior is intended
Projects
None yet
Development

No branches or pull requests

2 participants