restic: restic init password interaction fail on MSYS2 Windows bash

I’m a MSYS2 respectively Cygwin user. I’ve tried restic init in a MSYS2 bash. It fail with error:

v% restic init --repo backup
enter password for new backend: unable to read password: Das Handle ist ungültig.
v% restic init --repo backup
enter password for new backend: unable to read password: Das Handle ist ungültig.

v% echo $0
/usr/bin/bash

The same at a dos console works.

H:\>restic init --repo backup
enter password for new backend:
enter password again:
created restic backend xxxxx backup

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

It’s a general Go issue. You can copy util_linux.go to util_windows.go and add ‘windows’ to build. After a go run build.go run the output is:

v% go run ./build.go
# golang.org/x/crypto/ssh/terminal
E:\tmp\restic-build-031239579\src\golang.org\x\crypto\ssh\terminal\util.go:27: undefined: syscall.Termios
build failed: exit status 2
exit status 1

The Termios syscall is missing. I think it’s a general go problem. We’ve to file a new Golang issue and describe the scenario. I hope Cygwin will be a new Golang target.