Bug 466577 - Feature request: Ability to enter ssh key passphrase when doing a "git push" from Kate's git toolview
Summary: Feature request: Ability to enter ssh key passphrase when doing a "git push" ...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.12.2
Platform: macOS (DMG) macOS
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-28 00:42 UTC by Kristen
Modified: 2023-03-01 15:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristen 2023-02-28 00:42:45 UTC
SUMMARY
***
When doing a "git push" from Kate's Project plugin, the push will fail if the ssh key associated with the remote repository requires an ssh key passphrase. Adding the ability to prompt for the key passphrase would improve the usability of the Project plugin for some users.
***


STEPS TO REPRODUCE
1. Set up a local git repository, configured to push to a remote repository using an ssh key. When creating the ssh key, set a key passphrase.
2. Attempt to push committed changes to the remote repository using the "git push" icon in the Kate Project plugin

OBSERVED RESULT

Push fails due to inability to authenticate

EXPECTED RESULT

Prompt to enter the ssh key passphrase

SOFTWARE/OS VERSIONS

macOS: MacOS Monterey 12.2.1
The "Components" tab under "About Kate" says:
* KDE Frameworks Version 5.103.0
* Qt Version 5.15.8 (built against 5.15.8)
* The cocoa windowing system
Kate installed from a .dmg file of the most recent stable build

ADDITIONAL INFORMATION

Unsure if software/OS versions are relevant or if this feature currently does not exist in Kate on any OS.
Comment 1 Kristen 2023-02-28 00:55:26 UTC
My earlier comment may be incorrect in referring to doing a git push from the Projects plugin. If my description is unclear, I am referring to the git toolview where it is possible to perform simple git operations such as commits/pushes/pulls (I think this comes from the Projects plugin, but I am not 100% sure).
Comment 2 Bug Janitor Service 2023-02-28 18:35:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1134
Comment 3 Waqar Ahmed 2023-03-01 06:59:02 UTC
Git commit 5ccee078346d53a71044b2343c2e0355518a24e8 by Waqar Ahmed.
Committed on 28/02/2023 at 18:33.
Pushed by waqar into branch 'master'.

Git: set SSH_ASKPASS env var

If the user's ssh key has a passphrase, the program set by this env var
can be used to ask for password.

M  +21   -0    addons/project/gitwidget.cpp

https://invent.kde.org/utilities/kate/commit/5ccee078346d53a71044b2343c2e0355518a24e8
Comment 4 Waqar Ahmed 2023-03-01 15:20:53 UTC
As mentioned in the commit, you will have to set `SSH_ASKPASS` environment variable somewhere global. This environment variable should point to an "ssh-askpass" program. There are many such programs available.

If kate finds ksshaskpass (the kde askpass program), it will automatically set this variable for you.