我已经通过 pip 安装了 pass-import。
pip install pass-import
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pass-import in ./.local/lib/python3.12/site-packages (3.4)
Requirement already satisfied: pyaml in /usr/local/lib/python3.12/site-packages (from pass-import) (23.9.7)
Requirement already satisfied: zxcvbn in /usr/local/lib/python3.12/site-packages (from pass-import) (4.4.28)
Requirement already satisfied: requests in /usr/lib/python3.12/site-packages (from pass-import) (2.28.2)
Requirement already satisfied: PyYAML in /usr/lib64/python3.12/site-packages (from pyaml->pass-import) (6.0.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/lib/python3.12/site-packages (from requests->pass-import) (3.2.0)Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.12/site-packages (from requests->pass-import) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.12/site-packages (from requests->pass-import) (1.26.18)
但是当我尝试执行时:
pass import bitwarden bitwarden_export_20240104164527.json
Error: import is not in the password store.
这是我的路径:
/home/hhlp/.local/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/opt/p4v/bin:/opt/p4v/bin
但我认为还不足以使其发挥作用。
https://github.com/roddhjav/pass-import#readme
一种解决方案是这样,从 fedora COPR repo 只需启用并安装它
https://copr.fedorainfracloud.org/coprs/tofik/password-store/packages/
sudo dnf copr enable tofik/password-store
然后安装它
sudo dnf install pass-import
但我想用 pip 下的官方版本来做这件事。
答案1
您pass-import
安装的pip
是密码存储的扩展。根据您发布的错误,Passwordstore 不知道您安装的扩展程序。
您的错误与您的 无关PATH
,从 COPR 安装可能会安装一个将扩展安装到正确位置的软件包。
您从安装命令发布的输出显示“默认为用户安装”,因此该pass-import
扩展可能会安装在本地某个位置。尝试找出find ~ -path \*/lib/password-store/\* -name import\*
.
您应该按照本地安装扩展的说明进行操作,并确保按照中的说明设置PASSWORD_STORE_ENABLE_EXTENSIONS
和环境变量。PASSWORD_STORE_EXTENSIONS_DIR
文档。确保PASSWORD_STORE_EXTENSIONS_DIR
指向包含扩展名的目录。