feat: remove paramiko#1606
Merged
Merged
Conversation
real-yfprojects
previously approved these changes
Feb 23, 2023
m3nu
requested changes
Feb 24, 2023
m3nu
requested changes
Feb 24, 2023
real-yfprojects
approved these changes
Feb 25, 2023
real-yfprojects
requested changes
Feb 25, 2023
Contributor
Author
|
Yeah, the pre-commit hooks made some deletions after my changes 😅 |
m3nu
requested changes
Mar 6, 2023
ThomasWaldmann
requested changes
Mar 9, 2023
Collaborator
ThomasWaldmann
left a comment
There was a problem hiding this comment.
minor consistency change
m3nu
previously approved these changes
Mar 9, 2023
Contributor
m3nu
left a comment
There was a problem hiding this comment.
Looks good. It's not a big shiny feature, but an important incremental improvement and refactoring.
m3nu
previously approved these changes
Mar 16, 2023
Contributor
|
Thanks for your patience. You wanna merge this, @real-yfprojects ? There was some note on formatting you added. Also needs squashing. |
9fdee76
real-yfprojects
approved these changes
Mar 17, 2023
diivi
added a commit
to diivi/vorta
that referenced
this pull request
Apr 11, 2023
Paramiko is a encryption key parsing library. It was used for determining which ssh keys are available on the system. This removes that fairly heavy dependency at replaces it with a very basic heuristic to determine ssh key file by their first line containing `-----BEGIN(\s\w+)? PRIVATE KEY-----`. * src/vorta/utils.py: Implement `is_ssh_private_key_file`. * src/vorta/utils.py (get_private_keys): Use `is_ssh_private_key_file` instead of paramiko. Enforce `077` permissions on key files. * src/vorta/views/ssh_dialog.py : Remove paramiko. * src/vorta/views/repo_tab.py (RepoTab.init_ssh): Show filename only in `sshComboBox`. * src/vorta/views/repo_add_dialog.py (AddRepoWindow.init_ssh_key): Show filename only in `sshComboBox`.
DaffyTheDuck
pushed a commit
to DaffyTheDuck/vorta
that referenced
this pull request
Jun 14, 2023
Paramiko is a encryption key parsing library. It was used for determining which ssh keys are available on the system. This removes that fairly heavy dependency at replaces it with a very basic heuristic to determine ssh key file by their first line containing `-----BEGIN(\s\w+)? PRIVATE KEY-----`. * src/vorta/utils.py: Implement `is_ssh_private_key_file`. * src/vorta/utils.py (get_private_keys): Use `is_ssh_private_key_file` instead of paramiko. Enforce `077` permissions on key files. * src/vorta/views/ssh_dialog.py : Remove paramiko. * src/vorta/views/repo_tab.py (RepoTab.init_ssh): Show filename only in `sshComboBox`. * src/vorta/views/repo_add_dialog.py (AddRepoWindow.init_ssh_key): Show filename only in `sshComboBox`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removed paramiko as a dependency and replaced it with a simple function that checks the first line of a file to verify if it's a ssh key.
Related Issue
#1559
Motivation and Context
Helped remove a heavy dependecy used just for checking if a file is a SSH key.
How Has This Been Tested?
Checked the combobox options
Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.