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

pass otp not working anymore (which: command not found) #176

Open
juipeltje opened this issue Dec 6, 2022 · 2 comments
Open

pass otp not working anymore (which: command not found) #176

juipeltje opened this issue Dec 6, 2022 · 2 comments

Comments

@juipeltje
Copy link

hello,

i was trying to generate an otp code and it gives the following error:

/usr/lib/password-store/extensions/otp.bash: line 20: which: command not found
Failed to generate OTP code: oathtool is not installed.

it seems to be complaining about this line in otp.bash:

OATH=$(which oathtool)

i have no clue what's going wrong here though, i checked and oathtool is definitely installed. i am also using this setup on a different computer running the same package versions and it works fine over there, the otp.bash also looks exactly the same on that second computer but still for some reason, on my main pc it gives the error. does anyone know what's going on?

@31239899
Copy link

31239899 commented Mar 4, 2023

@juipeltje

I know this may be late enough that it's not useful, but the error you're seeing is from bash saying that it can't find the which command. The best/easiest solution is to install which. You could also replace it with command -v (which is a Bash built-in command) in the script.

@juipeltje
Copy link
Author

thank you for your reply! yeah i ended up asking the same question on reddit and found out that i had to install which. it was working before so for some weird reason my system has deleted the package at some point i guess. i felt kinda silly after i realized that it was because of the which package and had nothing to do with pass otp, so i deleted my issue here (or at least i thought i did?). i'm not very familiar with github yet so maybe i did something wrong there.

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

2 participants