-
Notifications
You must be signed in to change notification settings - Fork 176
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't clone from GitHub #600
Comments
Generate a personal access token in the developer settings on GitHub. Use your normal username with HTTPS access, but for the password, use the actual token. Works perfectly. |
@m-radzikowski given you raised #601 as well did you ty using a MGit generated ssh key pair for both? If so, please try generating a ssh key pair another way and see if you have the same error? |
@maks I did not open the other issue. But I have run: ssh-keygen -t rsa -b 4096 -C "my@email" (as in GitHub docs) I added the public key to GitHub, copied the private to phone and added it in MGit. Now when I try to clone my repo, I'm getting error with a little bit more descriptive message:
I'm pretty sure the key is OK. One difference - with the key generated in MGit, when I went to https://github.com/settings/keys, I saw that the key was in fact used. With my own key, it has "never used" label. |
Ah yes sorry my mistake, I got that mixed up that you had filled that one as well. Thank you for the very clear steps to produce the error, I'll have a look at it and see if I can see what's not working. |
This is my workaround also after the March 15th deprecation of ssh-rsa1 keys by GitHub. I edited the raw config file of an existing repo on my phone to point to The updated HTTPS url is not reflected on the home repo screen if you were using |
Thanks for the workaround @dleeftink . But how can i now clone a new repository? In my imagination the correct way to generate a new ssh key with MGit witch matches the github requirements and then check out. Am i wrong? For me it seems MGit seems not (yet) to be able to generate such keys, is that correct? Btw, awesome to have such an app on android! |
@hilbert-ralf, just tried to clone a repository from my own GitHub account which works with the above method. I don't think Personal Access Tokens grant access to repo's authored by someone else. If necessary, try and fork a third-party repo and clone the fork from MGit's homescreen. Also make sure that the right privileges are set under Github Finally, my steps in MGit:
Hope that works! Would be nice to see MGit working natively with the latest SSH keys. |
Yes sorry about this issue, I haven't had a chance to look into it properly. The main problem, which has come up many times before is that MGit uses the JGit library which in turn makes use Jsch library for SSH and Jsch is very old and not been updated in a very long time. |
Thank you so much @dleeftink , that did the trick! Did not understand before that i actually have to use an access token instead of my password and no ssh et all. Also thank you @maks for explaining the underlying issue. =) From my side with that explanation put anythere present it would be okay to close the issue. best regards. |
Followed your steps and ran into the issue mentioned in #576. Then realized that instead of a fine-grained token I should use a classic personal access token as a password. Now everything works! Thank you for providing the steps! |
Describe the bug
I cannot clone neither a private or public repository from GitHub.
To Reproduce
Steps to reproduce the behavior:
[email protected]:m-radzikowski/myprivaterepo.git
Expected behavior
Repo should be cloned.
Smartphone (please complete the following information):
Additional context
I cannot clone any repo - I also tried this repo with URL:
[email protected]:maks/mgit.git
, got the same error.The error does not tell much about what is actually wrong.
I have MFA enabled on the github account, but this shouldn't matter if I use SSH URL, right?
The text was updated successfully, but these errors were encountered: