Search code examples
gitgithubsshopenshiftgit-clone

git clone : no address associated with name


I know there are many question asked about this but i found them not working in my case
As I'm not very known to git I'm facing a problem cloning a repo from openshift server. I have my ssh URL for my repo ( which is of the form ssh://some_text@my_site_url/~/git/my_app.git/ ), but when I'm trying to clone the repo using

git clone ssh://somt_text@my_site_url/~/git/my_app.git/

I'm getting this error message

Cloning into 'my_app'...

ssh: Could not resolve hostname my_site_url: no address associated with name
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I'm using git behind a proxy server of my college so I'm done setting the git proxy using

git config --global http.proxy httpProxy:port
git config --global https.proxy httpProxy:port

Please suggest if i'm missing any step or doing something wrong.

Note: I am using OpenShift to host my project and trying to access that using using ssh on my local computer.


Solution

  • You are not missing any step, but it seems that you are using git behind a proxy.

    Just configure your proxy properly or even before that, make sure that your proxy provides you permission to use ssh (if not you have to go for some other option to use https url anyhow).

    You can even try to use github in place of default OpenShift git repo (as you mentioned in comment), that will provide you with more options and of course more solutions in case you run into any porblem again.

    See these for more help: