Home > database >  Fatal: Failed to read password file: open ~/RPI/filename.sec: no such file or directory. But it exis
Fatal: Failed to read password file: open ~/RPI/filename.sec: no such file or directory. But it exis

Time:07-05

Trying to run .sh file. with --password "~/RPI.filename"in it. Should read the filename but getting an error. Even though the file exists

error:

Fatal: Failed to read password file: open ~/RPI/filename.sec: no such file or directory

list of directories and files:

~/RPI$ l
g.json  m1/  m2/  filename.sec  startm1.sh*

I have used it before and I know the method works but no idea what on earth is happening here.

CodePudding user response:

Maybe your script is running in sh instead of bash ? I think "~" is bash syntax.

CodePudding user response:

There are 1½ issues here...

First, quoting a tilde prevents tilde expansion; compare ls ~/RPI.filename and ls "~/RPI.filename"

=> leave the tilde unquoted if you don't want a literal '~'

Second, is it ~/RPI.filename or ~/RPI/filename?

  • Related