Skip to content

Credential export support added#761

Open
AdityaMitra5102 wants to merge 8 commits into
Nitrokey:masterfrom
AdityaMitra5102:password-export-import
Open

Credential export support added#761
AdityaMitra5102 wants to merge 8 commits into
Nitrokey:masterfrom
AdityaMitra5102:password-export-import

Conversation

@AdityaMitra5102

@AdityaMitra5102 AdityaMitra5102 commented Jun 10, 2026

Copy link
Copy Markdown

Uses the SDK version at PR 126

image

Output as text:

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets list
Command line tool to interact with Nitrokey devices 0.12.2
Please provide PIN to show PIN-protected entries (if any), or press ENTER to skip
Please touch the device if it blinks
Current PIN (8 attempts left):
Please touch the device if it blinks
01. Testpass    240/1   touch required,PWS data available
02. dummy       240/1   touch required,PWS data available
03. test1       240/1   touch required,PIN required,PWS data available

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets credential-export --output test1
Command line tool to interact with Nitrokey devices 0.12.2
Please provide PIN to export PIN-protected entries (if any), or press ENTER to skip
Please touch the device if it blinks
Current PIN (8 attempts left):
Please touch the device if it blinks
Passphrase (Keep is securely for import): V2SST-FKCBB-MLJX6-N6VTF-NMB84

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets reset
Command line tool to interact with Nitrokey devices 0.12.2
Do you want to continue? [y/N]: y
Please touch the device if it blinks
Done

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets set-pin
Command line tool to interact with Nitrokey devices 0.12.2
Password:
Repeat for confirmation:
Please touch the device if it blinks
Password set

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets list
Command line tool to interact with Nitrokey devices 0.12.2
Please provide PIN to show PIN-protected entries (if any), or press ENTER to skip
Please touch the device if it blinks
Current PIN (8 attempts left):
Please touch the device if it blinks
No credentials found

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets credential-import --input test1.json --passphrase V2SST-FKCBB-MLJX6-N6VTF-NMB84
Command line tool to interact with Nitrokey devices 0.12.2
Please provide PIN to export PIN-protected entries (if any), or press ENTER to skip
Please touch the device if it blinks
Current PIN (8 attempts left):
Please touch the device if it blinks

C:\Users\Aditya NK\Desktop>nitropy nk3 secrets list
Command line tool to interact with Nitrokey devices 0.12.2
Please provide PIN to show PIN-protected entries (if any), or press ENTER to skip
Please touch the device if it blinks
Current PIN (8 attempts left):
Please touch the device if it blinks
01. Testpass    240/1   touch required,PWS data available
02. dummy       240/1   touch required,PWS data available
03. test1       240/1   touch required,PIN required,PWS data available

C:\Users\Aditya NK\Desktop>

@AdityaMitra5102 AdityaMitra5102 requested a review from a team as a code owner June 10, 2026 09:51
@AdityaMitra5102 AdityaMitra5102 requested review from daringer, james-knippes, mmerklinger, robin-nitrokey and sosthene-nitrokey and removed request for a team June 10, 2026 09:51

@robin-nitrokey robin-nitrokey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I’ll do some testing tomorrow. I just have some minor comments regarding naming and messages, see below.

Comment thread pynitrokey/cli/nk3/secrets.py Outdated
Comment thread pynitrokey/cli/nk3/secrets.py Outdated
Comment thread pynitrokey/cli/nk3/secrets.py Outdated
Comment thread pynitrokey/cli/nk3/secrets.py Outdated
Comment thread pynitrokey/cli/nk3/secrets.py Outdated
Comment thread pynitrokey/cli/nk3/secrets.py Outdated

@robin-nitrokey robin-nitrokey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the changes!

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

Successfully merging this pull request may close these issues.

2 participants