pass-export


Namepass-export JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryThis is a command line tool to export and import passwords from/to pass (https://www.passwordstore.org/).
upload_time2022-08-06 10:37:05
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pass-export
This is a command line tool to export and import passwords from/to [pass](https://www.passwordstore.org/).
The passwords are exported to symmetrically encrypted files so they are independent of your private key.
You can use these exported files for making backups or to copy them to another computer.

```bash
$ pass
Password Store
├── bar
└── foo
$ pass-export
Please insert a password to encrypt the exported files: 
Please reenter the password: 
exported-passwords_2022-08-05/bar.gpg
exported-passwords_2022-08-05/foo.gpg
```

You can decrypt a password with

```bash
$ gpg -d exported-passwords_2022-08-05/foo.gpg
```

You can copy the exported passwords to a new computer and import them into a new password store

```bash
$ gpg --quick-gen-key pass default encrypt never
$ pass init pass
$ pass-import exported-passwords_2022-08-05
Please insert password to decrypt exported-passwords_2022-08-05/bar.gpg: 
imported exported-passwords_2022-08-05/bar.gpg
imported exported-passwords_2022-08-05/foo.gpg
```

# Installation
You can install pass-export and pass-import via pip/pipx

```bash
$ pipx install pass-export
```

But since this is just one module you do not need to install it.
You can just download and execute it.
In that case you need to specify "export" or "import" as an additional first argument:

```bash
$ wget -O pass-export-import.py 'https://gitlab.com/erzo/pass-export/-/raw/master/src/pass_export/main.py'
$ python pass-export-import.py export
```

# Requirements
This program relies on the following other programs which are called via subprocess:

- gpg to decrypt and encrypt the passwords
- gpgconf to restart the gpg-agent
  (I am temporarily changing `~/.gnupg/gpg-agent.conf` so that even if you have configured gpg securely you do not need to reinsert your password for every single password.)
- shred to remove a temporary file in which I shortly kept the password for the exported files so that you do not need to reenter it for every single password.
  The assumptions that shred is based upon are not valid for SSDs.
  Therefore I am writing the file to the path indicated by `XDG_RUNTIME_DIR`, hoping that it will stay in RAM instead of getting written to an SSD.

# Running the tests
tox is configured to *not* download packages every time you run it so you can use it wen you have no internet connection, too.
Instead it takes it's dependencies from the directory .package-store.
This can be initialized with

```bash
$ ./release.sh --test
```

Afterwards you can continue to use that command or run tox directly:

```bash
tox
```

tox, however, is very slow.
So you may prefer to run mypy and pytest manually.
(The venv has been setup by `release.sh`.)

```
. venv/bin/activate
$ mypy src/pass_export/ tests/
$ pytest
```

# License
This work is free. You can use, copy, modify, and/or distribute it
under the terms of the BSD Zero Clause License, see [LICENSE](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pass-export",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "erzo <erzo@posteo.de>",
    "download_url": "https://files.pythonhosted.org/packages/af/40/958d48ce249cd9fcf0b37f69ce2af1a66bb7275e46755cc04c33e74476b4/pass-export-1.0.1.tar.gz",
    "platform": null,
    "description": "# pass-export\nThis is a command line tool to export and import passwords from/to [pass](https://www.passwordstore.org/).\nThe passwords are exported to symmetrically encrypted files so they are independent of your private key.\nYou can use these exported files for making backups or to copy them to another computer.\n\n```bash\n$ pass\nPassword Store\n\u251c\u2500\u2500 bar\n\u2514\u2500\u2500 foo\n$ pass-export\nPlease insert a password to encrypt the exported files: \nPlease reenter the password: \nexported-passwords_2022-08-05/bar.gpg\nexported-passwords_2022-08-05/foo.gpg\n```\n\nYou can decrypt a password with\n\n```bash\n$ gpg -d exported-passwords_2022-08-05/foo.gpg\n```\n\nYou can copy the exported passwords to a new computer and import them into a new password store\n\n```bash\n$ gpg --quick-gen-key pass default encrypt never\n$ pass init pass\n$ pass-import exported-passwords_2022-08-05\nPlease insert password to decrypt exported-passwords_2022-08-05/bar.gpg: \nimported exported-passwords_2022-08-05/bar.gpg\nimported exported-passwords_2022-08-05/foo.gpg\n```\n\n# Installation\nYou can install pass-export and pass-import via pip/pipx\n\n```bash\n$ pipx install pass-export\n```\n\nBut since this is just one module you do not need to install it.\nYou can just download and execute it.\nIn that case you need to specify \"export\" or \"import\" as an additional first argument:\n\n```bash\n$ wget -O pass-export-import.py 'https://gitlab.com/erzo/pass-export/-/raw/master/src/pass_export/main.py'\n$ python pass-export-import.py export\n```\n\n# Requirements\nThis program relies on the following other programs which are called via subprocess:\n\n- gpg to decrypt and encrypt the passwords\n- gpgconf to restart the gpg-agent\n  (I am temporarily changing `~/.gnupg/gpg-agent.conf` so that even if you have configured gpg securely you do not need to reinsert your password for every single password.)\n- shred to remove a temporary file in which I shortly kept the password for the exported files so that you do not need to reenter it for every single password.\n  The assumptions that shred is based upon are not valid for SSDs.\n  Therefore I am writing the file to the path indicated by `XDG_RUNTIME_DIR`, hoping that it will stay in RAM instead of getting written to an SSD.\n\n# Running the tests\ntox is configured to *not* download packages every time you run it so you can use it wen you have no internet connection, too.\nInstead it takes it's dependencies from the directory .package-store.\nThis can be initialized with\n\n```bash\n$ ./release.sh --test\n```\n\nAfterwards you can continue to use that command or run tox directly:\n\n```bash\ntox\n```\n\ntox, however, is very slow.\nSo you may prefer to run mypy and pytest manually.\n(The venv has been setup by `release.sh`.)\n\n```\n. venv/bin/activate\n$ mypy src/pass_export/ tests/\n$ pytest\n```\n\n# License\nThis work is free. You can use, copy, modify, and/or distribute it\nunder the terms of the BSD Zero Clause License, see [LICENSE](LICENSE).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This is a command line tool to export and import passwords from/to pass (https://www.passwordstore.org/).",
    "version": "1.0.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "md5": "e2076e39b1f22750397ec8541e1b4c37",
                "sha256": "680edfd26fb39938920a1e7e02b607dc4408fb2bfcb9c1ef192c0b966dade42b"
            },
            "downloads": -1,
            "filename": "pass_export-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e2076e39b1f22750397ec8541e1b4c37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7017,
            "upload_time": "2022-08-06T10:37:01",
            "upload_time_iso_8601": "2022-08-06T10:37:01.545985Z",
            "url": "https://files.pythonhosted.org/packages/a0/48/95ec0a2f186138c9c609092664f3ad8b8abc8765a94b59d6c616fce460ca/pass_export-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "md5": "0d585441633081f0839689e2f71144ec",
                "sha256": "3218be316c44f51c548dba1d602d1c8aad8d41e9df9f2d4b2411de245a7cfa4e"
            },
            "downloads": -1,
            "filename": "pass-export-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0d585441633081f0839689e2f71144ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 10846,
            "upload_time": "2022-08-06T10:37:05",
            "upload_time_iso_8601": "2022-08-06T10:37:05.316880Z",
            "url": "https://files.pythonhosted.org/packages/af/40/958d48ce249cd9fcf0b37f69ce2af1a66bb7275e46755cc04c33e74476b4/pass-export-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-08-06 10:37:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pass-export"
}
        
Elapsed time: 0.43645s