[Cloning Failure] SSH to localhost: Address not found

I’ve a GOGS server running in one container and am trying to launch a Drone container to automate CI. Though Drone is able to integrate with my local GOGS server and sync the repos, it should the following error during cloning, even before moving to building:

Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/master:
ssh: connect to host localhost port 22: Address not available
fatal: Could not read from remote repository.

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

Both containers are connected to a docker network. Can someone please help me out.

Drone uses git+http to clone, not git+ssh. You need to configure gogs to allow git+http

localhost means different things in each container. You’ll need to use a different DNS hostname that can be reached by a different container.

I understand, @techknowlogick . I only connect them through their separately allotted IPs. Not localhost

@bradrydzewski Can you help me how to configure GOGS for git+http ?