getaddrinfo: No addre ss associated with hostname (SocketError) - ruby

I need help. I have trouble when I try to push sources to exist repository on my gitlab hosting. When I do
ssh -vT git#git.host.org
or
git push -u origin master #in repository folder
I see
/usr/local/lib/ruby/2.0.0/net/http.rb:878:in `initialize': getaddrinfo: No addre
ss associated with hostname (SocketError)
from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open'
from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
from /usr/local/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
from /usr/local/lib/ruby/2.0.0/net/http.rb:877:in `connect'
from /usr/local/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
from /usr/local/lib/ruby/2.0.0/net/http.rb:851:in `start'
from /home/git/gitlab-shell/lib/gitlab_net.rb:62:in `get'
from /home/git/gitlab-shell/lib/gitlab_net.rb:24:in `discover'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:77:in `user'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:82:in `username'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:36:in `exec'
How can I solve it? Thanks.

Not sure if you're using gitlab/gitlabhq and getting this error. But I got this error when using gitlab. In my config.yml in /home/git/gitlab-shell/config.yml i had typed my gitlab_url wrong.

In addition to #Jerinaw answer, these might be the reasons-
Check if remotes are correct using remote -v
Check your host credentials
Check ssh key

Assuming the Network access to git.host.org is given:
getaddrinfo: No addre
ss associated with hostname (SocketError)
means that to your DNS Name git.host.org there is no corresponding address which can be resolved.
you can try nslookup your host:
$nslookup git.host.org
it should give you a adress corresponding to that host otherwise your server doesnt know where to connect. But you will probably not. If you want to fix that only for your server you can put in /etc/hosts something like
192.168.1.100 git.host.org
where 192.168.1.100 must be the correct address to your remote server.
Or you can use the ip address in the first place.

Related

Connection Refused

I'm getting the following error when I type git clone --recursive https://github.com/projectname:
fatal: unable to access 'https://github.com/projectname': Failed to connect to 127.0.0.1 port 1080 after 2057 ms: Connection refused
I've been searching for the solution but I haven't find yet.
I also cloned repository with SSH key but while downloading the submodules I get the same message.
Check first your environment variables, looking for any HTTP_PROXY/HTTPS_PROXY.
For instance, at work, I have mine set to 127.0.0.1:3128, because I use an intermediate local proxy px, in order to avoid entering my credentials whenever I need to use the company proxy.

MySqlworkbench is not connecting with warden. How I can fix this?

our connection attempt failed for user 'Magento' to the MySQL server at db:3306:
Cannot open SSH Tunnel: Failed to resolve hostname tunnel. warden.test (nodename nor servname provided, or not known)
I ran the commands:
warden env down
//Then ran
warden env up
But it's not fixing my problem
I ran the following command and it fixed the error
warden svc up

Google Cloud SQL + Heroku

Here is error message that I got!
2014-03-13T08:30:21.010764+00:00 heroku[web.1]: Starting process with command `node dbserver.js`
2014-03-13T08:30:22.485293+00:00 app[web.1]: listening on 14218
2014-03-13T08:30:22.486771+00:00 app[web.1]: lo 127.0.0.1
2014-03-13T08:30:22.551389+00:00 app[web.1]:
2014-03-13T08:30:22.554354+00:00 app[web.1]: at Protocol.end (/app/node_modules/mysql/lib/protocol/Protocol.js:78:13)
2014-03-13T08:30:22.554354+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:78:28)
2014-03-13T08:30:22.554354+00:00 app[web.1]: Error: Connection lost: The server closed the connection.
2014-03-13T08:30:22.554354+00:00 app[web.1]: at Socket.EventEmitter.emit (events.js:117:20)
2014-03-13T08:30:22.554354+00:00 app[web.1]: at _stream_readable.js:920:16
2014-03-13T08:30:22.554354+00:00 app[web.1]: at process._tickCallback (node.js:415:13)
2014-03-13T08:30:24.327286+00:00 heroku[web.1]: Process exited with status 8
When I test this locally (with foreman or without), and it works!
I have added my IP address in Authorized Networks for Google Cloud SQL,
and as well as my applications's IP address.
I have used http://www.hcidata.info/host2ip.cgi to find out my web app's IP address.
Can anyone had same experience?
Your problem may be similar to the one in this question:
Your problem may be that Cloud SQL is not allowing your Dyno's IP address.
Because the Heroku dyno grid is dynamic in nature, the IP address that a given dyno will be assigned over time will be both dynamic and unpredictable.
As mentioned in the other question, you can use a proxy Heroku add-on that would give you a static IP.
A workaround can be to whitelist 0.0.0.0/0 (all possible IP addresses) within your Cloud SQL instance.
If you do so, I highly recommend requiring SSL for your database connection.

Any available solution for Mac Air : ssh githup operation timed out?

I've searched and tried kinds of solution before I ask this question, but obviously it doesn't work. That may be a common problem of Mac Air:
And the problem is that when I tried to establish new repo for git and type:
git remote add origin https://githup.com/username/reponame.git
git push -u origin master
I got this error:
fatal : unable to access 'https://githup.com/....': failed to connect to githup.com443; Operation timed out.
If I use git like this:
git remote add origin git#githup.com:username/repo.git
git push -u origin master
I got these:
ssh: connect to host githup.com port 22: Operation timed out
fatal: Could not read from remote repository.
I just begin to doubt that ssh service of Mac Air may be not available.
Any useful solution ?
Thanks very much in advance!!!
Have you tried https://github.com instead of https://githup.com.
I guess that is the error.

Git ssh connection refused with the following format

Whenever I use the following
url = ssh://user#dev.example.com:imageInfo.git
in .git/config for a remote repo I get the following error
ssh: connect to host port 22: Connection refused
fatal: The remote end hung up unexpectedly
but if use the following
ssh user#dev.example.com
outside of git I connect without a problem.
Git also connects to same server with a gitosis user using
url = gitosis#dev.example.com:imageInfo.git
in .git/config and it has not problems.
so to sum things up in short my .git/config file looks like this
[remote "production"]
url = ssh://user#dev.example.com:imageInfo.git
url = gitosis#dev.example.com:imageInfo.git
any ideas?
You have the format of the SSH URL wrong - you can either use the scp-style syntax, like:
user#dev.example.com:imageInfo.git
... or the true URL form, where you need a / after the host rather than a :, and an absolute path, which I can only guess at, e.g.:
ssh://user#dev.example.com/srv/git/imageInfo.git
The documentation for git's URLs is here, but kernel.org is down at the moment, so you may want to look at the cached version here.
I got this message due to not having sshd daemon installed and running. So I did 'sudo apt-get install ssh' and the issue was solved.

Resources