# Drone CI pipeline first step clone failed: Connection refused

**URL:** <https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536>\
**Category:** Drone Support\
**Created:** [July 5, 2020, 3:28am UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536 "2020-07-05T03:28:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![linxuyalun](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@linxuyalun](https://drone.discourse.group/u/linxuyalun)\
**Post date:** [July 5, 2020, 3:28am UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/1 "2020-07-05T03:28:30Z")

</div>

I just installed drone in my k8s cluster as well as kube runner

Our git server is bitbucket, so I configure a lot of variables and install it by helm

I skip certificate verify because the cert of bitbucket is self-signed

It seems everything is ok at first, but when I try running the ci, the `clone` step failed:

 ![WeChat1f4cb78b5c67d0b1510e8e649027775c](https://canada1.discourse-cdn.com/flex003/uploads/testdrone/original/2X/c/ce964c8fa3b9bee480b4d10eb2db8c2cfa013025.jpeg)

I am really confused about it and have no idea how to solve this problem

---

<div class="post-metadata">

**Author:** ![linxuyalun](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@linxuyalun](https://drone.discourse.group/u/linxuyalun)\
**Post date:** [July 6, 2020, 4:05am UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/2 "2020-07-06T04:05:29Z")

</div>

Our bitbucket can also be visited by external traffic, so this should not a firewall probelm

---

<div class="post-metadata">

**Author:** ![linxuyalun](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@linxuyalun](https://drone.discourse.group/u/linxuyalun)\
**Post date:** [July 6, 2020, 11:58am UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/3 "2020-07-06T11:58:16Z")

</div>

Or is there any way I clone the repo by ssh instead of https?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [July 6, 2020, 9:00pm UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/4 "2020-07-06T21:00:35Z")

</div>

Is your bitbucket instance configured to use private mode? If so, you probably need to configure Drone to always authenticate when cloning using the [DRONE\_GIT\_ALWAYS\_AUTH](https://docs.drone.io/server/reference/drone-git-always-auth/) server setting.

---

<div class="post-metadata">

**Author:** ![linxuyalun](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@linxuyalun](https://drone.discourse.group/u/linxuyalun)\
**Post date:** [July 7, 2020, 7:36am UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/5 "2020-07-07T07:36:23Z")

</div>

I set it as TRUE but unlucky

---

<div class="post-metadata">

**Author:** ![linxuyalun](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@linxuyalun](https://drone.discourse.group/u/linxuyalun)\
**Post date:** [July 7, 2020, 12:22pm UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/6 "2020-07-07T12:22:43Z")

</div>

I modify the drone/clone and I find something:

I both ping and curl google in drone/clone container

I found that ping work but curl fail which told me “connection refused”

So I believe there is something wrong of network in kube-runner container

I still try to figure it out

Btw, I can run all the commands successfully out of the container, so is it possible to let the kube runner and its pipeline running under the ‘host’ network

---

<div class="post-metadata">

**Author:** ![linxuyalun](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@linxuyalun](https://drone.discourse.group/u/linxuyalun)\
**Post date:** [July 8, 2020, 4:54am UTC](https://drone.discourse.group/t/drone-ci-pipeline-first-step-clone-failed-connection-refused/10536/7 "2020-07-08T04:54:24Z")

</div>

I finally find the problem, we have istio in our environment

when kube-runner start, istio injects a side-car container in the pipeline container which messes up the network

I turn off the inject option and then it works well
