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

x/crypto/ssh/terminal: ReadPassword seems to be broken when running within IntelliJ with Go plugin #21009

Closed
iwillneverstop opened this issue Jul 14, 2017 · 1 comment

Comments

@iwillneverstop
Copy link

version go1.8.3 windows/amd64 with golang.org/x/crypto/ssh/terminal

ReadPassword seems to be broken when running within IntelliJ.

Reproduction Case:

package main

import (
"fmt"
"golang.org/x/crypto/ssh/terminal"
)

func main() {
fmt.Print("password: ")
password, err := terminal.ReadPassword(int(syscall.Stdin))

if err != nil {
fmt.Println(err)
}

fmt.Println(string(password))
}

I got an error "The handle is invalid.".

The same code works well if I build it into an EXE file and run the EXE file from the Terminal.

@iwillneverstop iwillneverstop changed the title ReadPassword seems to be broken when running within IntelliJ. ReadPassword seems to be broken when running within IntelliJ with Go plugin Jul 14, 2017
@dlsniper
Copy link
Contributor

Hi,

This error has nothing to do with Go. It's caused by the fact that the IDE doesn't run the process in a pty. For more details please see (and watch) https://youtrack.jetbrains.com/issue/PY-19938

This issue can be closed.

Thank you

@mikioh mikioh changed the title ReadPassword seems to be broken when running within IntelliJ with Go plugin x/crypto/ssh/terminal: ReadPassword seems to be broken when running within IntelliJ with Go plugin Jul 21, 2017
@golang golang locked and limited conversation to collaborators Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants