eclipse (photon) transport error on Team->Remote->Push cannot get remote repository refs invalid PK

58 views
Skip to first unread message

e47...@gmail.com

unread,
Dec 27, 2018, 7:34:48 PM12/27/18
to GitLab
Hi,

   Newbie question. I'm trying to use Eclipse with GitLab. I generate an ssh keypair on Linux with ssh-keygen, add it to my ~/.ssh/config as described in the GitLab docs, upload the newly generated public key to GitLab, test it with ssh -T - as described in the docs, works fine. I add the private key file to Eclipse as described in https://wiki.eclipse.org/EGit/User_Guide#Eclipse_SSH_Configuration (and remove the other existing key files, just to be sure). 
 
   I've converted an existing Eclipse project to a local repository as described in an earlier part of the linked Eclipse article, and created an empty GitLab project using a web browser. I try and add the files in my local repository to the newly created GitLab repository, with Team->Remote->Push on the Eclipse project, and get a dialog saying 

   "Transport Error: Cannot get remote repository refs.
    invalid privatekey: 

This is the point that I am stuck at.

Anyone have any ideas? 

I have used the project url from the web-browser, but changed the protocol to ssh, and added the git user id, as described in the linked article, and tried it with and without a .git extension.

 Can't say this is the nicest introduction to GitLab imaginable.

Aleksey Tsalolikhin

unread,
Dec 27, 2018, 8:04:19 PM12/27/18
to gitl...@googlegroups.com
> test it with ssh -T - as described in the docs

URL, please?  I'd like to see that section in the docs.

Can you git clone on the command line using the keypair you generated?

> I have used the project url from the web-browser, but changed the protocol to ssh, and added the git user id, as described in the linked article, and tried it with and without a .git extension.

Can you please try it with the SSH URL you see in the project page when you visit GitLab with a web browser?  This way it's sure to be the right URL.
(Select the blue "Clone' pull-down, and then c opy the SSH URL.)
-- 
Achieve real learning.  Email trai...@verticalsysadmin.com.


--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/62d37ee6-fe0a-4d42-a297-5adfc9840d31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

e47...@gmail.com

unread,
Dec 27, 2018, 9:13:59 PM12/27/18
to GitLab
Hi Aleksey,

   Thanks for the reply.


On Friday, 28 December 2018 01:04:19 UTC, Aleksey Tsalolikhin wrote:
> test it with ssh -T - as described in the docs

URL, please?  I'd like to see that section in the docs.

The URL for the GitLab docs on SSH that I'm working from is:




Can you git clone on the command line using the keypair you generated?

 
-- I tried on the command line with the commands listed for an existing repository, and the files checked in OK (I could see them appear when I looked at the project again on GitLab). I got prompted for the password for this keypair, so I am sure the correct key-pair is being used (it's also the only one I have uploaded to GitLab).

 
> I have used the project url from the web-browser, but changed the protocol to ssh, and added the git user id, as described in the linked article, and tried it with and without a .git extension.

Can you please try it with the SSH URL you see in the project page when you visit GitLab with a web browser?  This way it's sure to be the right URL.
(Select the blue "Clone' pull-down, and then c opy the SSH URL.)
-- 
Achieve real learning.  Email trai...@verticalsysadmin.com.

-- Now when I try Team->Remote->Push in Eclipse, I get a different dialog, The radio button for Configured remote directory is selected, and the field is set to:

origin: g...@gitlab.com:my_user_id/project_slug.git

When I click on "Next", I get the same error dialog.

If I choose the other "Custom URI" radio button, copy in the URI from the SSH clone field on the GitLab project page, and click "Next", I get the same error dialog.

I've just done a bit more digging/Googling, and it looks like it may well be related to this bug in eclipse:


Will check it out more thoroughly tomorrow morning.

Thanks for the help!

Aleksey Tsalolikhin

unread,
Dec 28, 2018, 5:37:46 AM12/28/18
to gitl...@googlegroups.com
Good!  Excellent progress. Sounds like the next step is to try using a different key-pair, as per the forum thread you found (https://www.eclipse.org/forums/index.php/m/1799851/).    Very well done, continue.  

e47...@gmail.com

unread,
Dec 29, 2018, 2:25:47 PM12/29/18
to GitLab
Hi,

   I started again from scratch, deleted the project on GitLab, generated new RSA keys with:

ssh-keygen -t rsa -b 4096 -f gitlab_rsa -C "my_git...@gitlab.com"

   Then I uploaded the new public key.

   I tested it with:

ssh -T git@gitlab,com 

   and it gives me a welcome message.

   I create the local git repository as described in the Eclipse wiki.

   I try to use the commands listed on the GitLab project page for adding an existing repository, but the first line errors out with

error: Could not rename config section 'remote.origin' to 'remote.old-origin'

 I try to use "Team->Remote->Push" to upload the files to the Gitlab repository, using the URI from the clone ssh button, but when I click "Next", I get a dialog saying:

The authenticity of host 'gitlab.com' can't be established. The RSA key fingerprint is ......

But the key fingerprint doesn't match the key fingerprint listed on GitLab for the new RSA key I have uploaded.

I'm figuring that this is a bug, but I can't figure out what to do next?

Aleksey Tsalolikhin

unread,
Jan 6, 2019, 9:34:48 AM1/6/19
to gitl...@googlegroups.com
On Sat, Dec 29, 2018 at 11:25 AM <e47...@gmail.com> wrote:

   I started again from scratch, deleted the project on GitLab, generated new RSA keys with:

ssh-keygen -t rsa -b 4096 -f gitlab_rsa -C "my_git...@gitlab.com"

   Then I uploaded the new public key.

   I tested it with:

ssh -T git@gitlab,com 

   and it gives me a welcome message.

Great! So far, so good.
 

   I create the local git repository as described in the Eclipse wiki.

   I try to use the commands listed on the GitLab project page for adding an existing repository, but the first line errors out with

error: Could not rename config section 'remote.origin' to 'remote.old-origin'

Please provide complete information.  What was the command you ran that produced the above error message? 

 I try to use "Team->Remote->Push" to upload the files to the Gitlab repository, using the URI from the clone ssh button, but when I click "Next", I get a dialog saying:

The authenticity of host 'gitlab.com' can't be established. The RSA key fingerprint is ......

But the key fingerprint doesn't match the key fingerprint listed on GitLab for the new RSA key I have uploaded.

I'm figuring that this is a bug, but I can't figure out what to do next?

The RSA key for gitlab.com is the host public key that gitlab.com presents; that's different from your public key.

Does Eclipse give you an option to accept the key that gitlab.com presents? 
 
Reply all
Reply to author
Forward
0 new messages