my project has 2 remote git server to push.
it pushes to both of them but fetch from the first one as you can see below:
git remote -v
origin git@gitlab.com:XXXXXX/XXXXXX.git (fetch)
origin git@gitlab.com:XXXXXX/XXXXXX.git (push)
origin http://second_server_ip:port/XXXXXX/XXXXXX.git (push)
some times the first one is going down for deploying new version or some other stuff and in these times if I want to push I will get this error:
git push
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
but the second server is up.
so is there any way to push just in the second server?