Git fetch fails

Answered

Hi.

I have .NET project with Git repository (cloned with SSH).

Using git fetch, git pull from console (outside of Rider) works perfectly.

But in Rider when I hit Update project or Fetch it fails with following prompt:

It does not matter what I put in or cancel. Event Log says:

Update Failed
Permission denied, please try again.
Permission denied, please try again.
git@gitlab.xxxxxx.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

 

Please, how to setup Git properly in Rider?

Thanks.

6 comments
Comment actions Permalink

Hello Petr Gurecky

When you are trying to run `git pull` in cmd.exe are you prompted to enter passphrase as well?
Do you have ssh config in place?

0
Comment actions Permalink

Hi.

As I mentioned - commands from console outside of Rider work fine.
SSH is set up correctly according to GitLab docs (here) and key is in preferred ED25519 format. It's located in c:\Users\<my.username>\.ssh folder.

0
Comment actions Permalink

Hi,

Do you have PasswordAuthentication in your ssh config?
Have you configured your SSH while IDE was running? 
IDE relies on command-line git and if it's working fine in cmd.exe then it should work in IDE as well.
Probably, there could be an issue with environment inheritance and IDE has been started before all SSH configuration was done, so restart may be required.
Are you using Git For Windows or TortoiseGit?

0
Comment actions Permalink

Thanks for the reply, Ruslan Kuleshov

To answer your questions:
Do you have PasswordAuthentication in your ssh config? There's no config file in my .ssh folder (or elsewhere)
Have you configured your SSH while IDE was running? No, it was configured long time before Rider installation
Are you using Git For Windows or TortoiseGit? Git for Windows 2.21.0

After restarting IDE (Windows restart) Git operations seem to work (for now).

But it does not make sense to me to be the reason - I've restarted serveral times before and the problem persisted.
Even if it was Gitlab's issue (company's on-premise solution) makes no sense since the console was/is working properly all the time.

I'm confused about this.

If the problem rises again I'll get back (hopefully with further tech. details) to this thread.

Thanks for now.

0
Comment actions Permalink

Hi Petr Gurecky

>But it does not make sense to me to be the reason - I've restarted serveral times before and the problem persisted.
Even if it was Gitlab's issue (company's on-premise solution) makes no sense since the console was/is working properly all the time.

There could be an issue with your SSH agent and IDE couldn't inherit environment related to you SSH. Probably, you've had your IDE running from Toolbox, then it this case a restart of Toolbox is required, rather than only an IDE instance.

Please feel free to get back to us via Support Request or YouTrack if the issue comes back so we could take a deeper look into your issue

0
Comment actions Permalink

I will.

Thank you very much for the support!

0

Please sign in to leave a comment.