4

I am getting below error while cloning a git repository from azure devops URL : https://dev.azure.com/mycompany/myproject/_git/myproject ERROR : Could not resolve host: dev.azure.com

i am trying via Git CMD and VS Code. Both is not working.

I also tried using the token which we get in azure repo.

I unset all the proxy now, becuase i was getting HTTP403 error while clone before.

NOTE : The proxy which i used was fom my organisation. And now iam doing this as a sample project with my personal gmail id in azure devops.

Thanks, Chithra

mike
  • 1,233
  • 1
  • 15
  • 36
chithra
  • 67
  • 1
  • 6

1 Answers1

3

If you were working behind a corporate proxy. You can try registering your company's proxy in your git config using below command.

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:port

You can try running below command

git config --global --unset http.proxy 
git config --global --unset https.proxy

Check out this thread for more information.

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43
  • Now i am geeting an error after setting the proxy: Received HTTP code 403 from proxy after CONNECT – chithra Jun 29 '20 at 08:08
  • 1
    It looks like a permission issue of access the repo. Did it prompt you for password? Try using git url `https://mycompany@dev.azure.com/mycompany/myproject/_git/myproject` , Or try providing credentials for your azure repo while git cloning. Use `youruser:password` or `PAT` in the git clone url. eg. `git clone https://PAT@dev.azure.com/mycompany/myproject/_git/myproject`, Or use SSH url instead of HTTP – Levi Lu-MSFT Jun 29 '20 at 08:29
  • Hi @chithra How was it going? – Levi Lu-MSFT Jun 30 '20 at 09:55
  • Yes, i used this syntax only. Is there any issue with my PROXY then?Becuase i can clone my git repos using that proxy. Only issue while cloning azure repo – chithra Jul 01 '20 at 07:04
  • Which syntax you have used. Did it prompt you for password. You can try using the credential generated by clicking the `Generate Git Credentials` when you click the `clone` button to get the clone url on azure devops repo – Levi Lu-MSFT Jul 07 '20 at 07:26