Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not import SSH key #640

Open
exp-3 opened this issue May 21, 2022 · 9 comments
Open

Can not import SSH key #640

exp-3 opened this issue May 21, 2022 · 9 comments

Comments

@exp-3
Copy link

exp-3 commented May 21, 2022

Browsing for files displays only folders, not files.

@exp-3
Copy link
Author

exp-3 commented May 21, 2022

S20521-22070298
S20521-22071914

@prahal
Copy link

prahal commented Sep 5, 2022

I have the same issue but only on my Android 11 device.

@prahal
Copy link

prahal commented Sep 7, 2022

I confirm I can reproduce the issue of no file shown by import ssh key inapp browser in Android Studio 4.1.1 AVD with "Nexus 5X API 30 x86" (Android 11) with MGit 1.6.2 and the issue is not there with an emulated "Nexus 5X API 29 x86" (Android 10).
The issue is still there on ColorOS 12 (Android 12) to which I recently upgraded.

@prahal
Copy link

prahal commented Sep 8, 2022

I found a workaround, rename the key file to .JPG or .mp3 (I suppose a few other extensions too, but for one .pdf or .zip does not work).
Then in MGit import ssh key in-app browser, you will see the file with the added extension. Import it.
Then in MGit rename the imported key without the extension, by long touching the filename and clicking on the label icon that appears on top. In the rename popup remove the extension. Then press "Rename".

@prahal
Copy link

prahal commented Sep 9, 2022

This is due not Google Play Store only giving "multimedia files access" to MGit. There is an FDroid version 1.6.3 which has access to all files, which should fix this issue.

@joneldominic
Copy link

I also encountered the same issue. Would mind @prahal share with us on what could be the possible reason why google only gives it "multimedia files access"?

@prahal
Copy link

prahal commented Jan 27, 2023

@joneldominic this is a known issue. Google Play store decides if an application is tagged to have access to all files. MGit has been refused this access even after numerous attempts from MGit author to comply with undisclosed requirements (and it could even be that it is totally arbitrary on the Google Play Store decision side).
This Google Play store restriction is only enforced in the newest Android versions. Thuswhy it starts with Android 11. The F-Droid MGit has full access tagged so it is able to access files that are not multimedia files only.

For the complete attempt to fix Google Play Store MGit permissions #620

In fact, as told in this bug report this will be fixed because Google Play Store next version will be only for Android below 11. One will have to install from F-Droid otherwise.

@prahal
Copy link

prahal commented Jan 27, 2023

By the way this bug could be closed per the issue is fixed. Install from F-Droid. One matter that might prevent that is if it is not possible to upgrade. Private keys stored in the application space will get lost if one uninstalls and installs.

@joneldominic
Copy link

This is understood. Thank you.

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

No branches or pull requests

3 participants