Cannot git clone from my own repo
-
I am trying to clone the documentation for ubports to my phone (desktop mode) to edit locally.
I have forked the docs on gitlab, I created the ssh keys on the phone (Wth passphrase) and I have added the public key to gitlab.
I ran the command below to test the connection. It worked after I entered the passphrase for the key.ssh -T git@gitlab.combut when i try to clone my fork with this
git clone git@gitlab.com:MyUserName/docs.ubports.com.gitI get the following
Cloning .... load key ... : Permission denied (publickey). fatal: Could not read from remote repository.I can clone public repos ... so it is not an issue with connecting to gitlab.
Any advice? -
@k.nacke
Sorry, there were snap connections that I had not set, so git-confined could not access the ssh keys. I have corrected it now and it works.
I have successfully cloned the docs repo. -
Could you try explicitly referencing the key file with the clone?
git clone -c core.sshCommand="ssh -i ~/.ssh/my_gitlab_ssh_key" \ git@gitlab.com:MyUserName/docs.ubports.com.git -
@arubislander
No luck. I get the same message when I specify the key as you suggested. I would guess it needs my passphrase but does not prompt me for it. What agent thing does UT use for secrets? -
One way to debug this is to see what ssh is doing:
GIT_SSH_COMMAND="ssh -v" git clone git@gitlab.com:MyUserName/docs.ubports.com.git -
@k.nacke
Sorry, there were snap connections that I had not set, so git-confined could not access the ssh keys. I have corrected it now and it works.
I have successfully cloned the docs repo. -
R RJDan has marked this topic as solved on
-
K Keneda has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register Login