Why is Git trying to connect to the wrong host? -
I have LAMP system setup on CentOS. I have GIT setup on the same server (we have just moved from SVN ).
git clone GIT: someexistingrepository.git
This is working fine, I have several repositories cloned around the system. Now, I had an existing directory that I wanted to work in a GIT which was to work in the directory. I followed the instructions from the accepted answer. As I am using a local server, I have used the following command:
git remote add the original git: myrepo.git
< Code> myrepo Git has already been setup with:
git init --bare myrepo.git
I did this I did the first and I did not have any problem, although this time I did, when I took part:
git push -u authenticity of the original master host 'git (173.192.58.115)' Can not be installed. RSA Key Fingerprint B1: 43: 2F: B: 7A: 2F: BA: 74: 6F: 19: 2A: B8: 35: 81: 10: B6 Are You Surely Connected Want to continue (yes / no)? ^ C
I saw that IP address and it is apparently used by git.co.uk
- anything with me (or git) Do not have to. Is there some weird behavior here, or can someone suggest me some wrong config? I have read that using the git: reponame.git
was the right way (I am afraid I am not getting such a question that I have read it for regret) - is it like this?
Update
Note: I am using SSH protocol, not git In addition, the file config
inside .git
looks like this:
[remote "parent"] fetch = + refs / heads / *: It is similar to : clone repositories and those using the method described above: refs / remotes / origin / * url = git: somerepo.git
That's why I do not know why someone is solving that host and not one. Uses (expected) error of git: //
:
Update 2
signals Thank you for and answer from O N, N, and I realized that the original user had this problem, while there were no other users, in the end, I realized that I was basically setting something on / etc / skel ...
$ cat .ssh / config host git hostname localhost user git identity file ~ / .ssh / id_rsa Then, git the host (and the answer is correct, thanks!). When I went to resolip
then I was in the root code, adding something as / var / www /
because it is owned by all root Fortunately my Other sites are setup with users.
The repository is a URL "Git:" part means that the host name "git" should be looked at , Which resolves git.co.uk on your system. I believe that the question you saw was actually used by git: //
which means that use the git protocol.
You must either user @ hostname for the
ssh: // user @ specific paths for SSH : / Hostname / path / to / reponame.git
If you are cloning on the same system, just use reponame.git
as the URL.
Comments
Post a Comment