0

Our Organization has the private Azure-DevOps(VSTS) repository which is used for our work purposes. Now one of my colleagues has created one private GitHub repository in which I was added as a collaborator to do some projects.

I was not able to clone the repository from the Github, I am getting

Failed to connect to github.com port 443: Timed out

To fix this, I have added the SSH key for the GitHub repository and now I am able to clone it.

The problem now is, when I try to clone or do any Git operations in my VSTS repository, I am getting this,

Git failed with a fatal error. unable to access 'https://XXXX.visualstudio.com/YYY/_git/ZZZ/': Failed to connect to github.com port 1080: Time out.

I can try to fix this by adding the ssh key in the VSTS as well but I don't want to do that since that would mean I need to clone all the repositories(more than 30) in my local system once again to work on it.

James Z
  • 12,209
  • 10
  • 24
  • 44
Badri
  • 202
  • 4
  • 14
  • It would be very strange if you're getting a *Github* issue connecting to Azure DevOps. Are you sure you're not mixing things up? (your message contains 'Failed to connect to github.com port 1080: Time out.') – rickvdbosch Nov 29 '19 at 07:40
  • Nope. I was pushing the code from visual studio to the azure dev ops, that's when I found this issue – Badri Nov 29 '19 at 07:43
  • If you're using **Azure DevOps**, there's no reason to get an error about connecting to **GitHub**. Chances are something isn't right in the configuration, or your colleague created a DevOps project with GitHub as the source control location. But then you should probably get the code straight from the repo on GitHub. – rickvdbosch Nov 29 '19 at 07:47
  • Yes. There is something wrong with the configuration which I am not able to identify. I am pretty sure that my GitHub project source location is not tied with DevOps. I believe it has to do with SSH keys since when I gave SSH key to the DevOps I am able to clone it. – Badri Nov 29 '19 at 08:17
  • Sounds more like a proxy issue, i.e. network level, than SSH key related. – bcmcfc Nov 29 '19 at 12:16

1 Answers1

0

You can try removing the cached credentials for your VSTS git from your local system, for sometime the cached credentials get corrupted. After the cached credentials is removed, you will be prompted to reenter the credentials when you do git operations against your vsts repo.

If you are working on windows system. You can go to Control Panel and Go to Credential Manager. And then the choose Windows Credentials, find the git related credentials and remove them.

enter image description here

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43
  • Tried it. It wasn't working. Also tried removing all the git related credentials from Credential Manager. – Badri Dec 03 '19 at 09:48
  • Are you able to clone your other repos in vsts, or this issue only remains with this specific repo? – Levi Lu-MSFT Dec 04 '19 at 09:50
  • It happens for all the repo's. I can now only able to clone throw SSH and not by HTTPS – Badri Dec 04 '19 at 09:58
  • That's weird, Please try cloning your repo with [Person Access Token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page). For example `git clone "https://@dev.azure.com///_git/" `. Make sure your PAT has the right permission to read and write repo – Levi Lu-MSFT Dec 04 '19 at 10:17