# flyctl deploy TLS handshake timeout

**URL:** <https://community.fly.io/t/flyctl-deploy-tls-handshake-timeout/3622>\
**Category:** Build debugging\
**Created:** [January 7, 2022, 5:06pm UTC](https://community.fly.io/t/flyctl-deploy-tls-handshake-timeout/3622 "2022-01-07T17:06:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Makki](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Ali\_Makki](https://community.fly.io/u/Ali_Makki)\
**Post date:** [January 7, 2022, 5:06pm UTC](https://community.fly.io/t/flyctl-deploy-tls-handshake-timeout/3622/1 "2022-01-07T17:06:20Z")

</div>

Hello,

I’ve been recently trying out fly and I love the simplicity around the tooling. That being said, I’ve been trying to redeploy my app using ` flyctl --app my_app deploy .`, however I keep running into TLS handshake issues:

After the image has been built:

```auto
The push refers to repository [registry.fly.io/my_app]
Error failed to fetch an image or build from source: error rendering push status stream: Get "https://registry.fly.io/v2/": net/http: TLS handshake timeout

```

other attempts:

```auto
==> Pushing image to fly
The push refers to repository [registry.fly.io/my_app]
14a6b6fe94e3: Pushing [==================================================>] 24.64MB
7c3c9eaa96cb: Pushing 1.536kB
630326550950: Pushed
e419ed535fd4: Pushed
04b2adabacbf: Pushed
d3ab2bc4c88a: Pushed
60c5ba62db2b: Retrying in 2 seconds
e2eb06d8af82: Pushed
Error failed to fetch an image or build from source: error rendering push status stream: net/http: TLS handshake timeout

```

and sometimes:

```auto
--> docker host: 20.10.11 linux x86_64
[+] Building 1.4s (0/1)
[+] Building 20.1s (4/4) FINISHED
 => CACHED [internal] load remote build context 0.0s
 => CACHED copy /context / 0.0s
 => ERROR [internal] load metadata for docker.io/library/alpine:3.14.2 20.0s
 => [internal] load metadata for docker.io/hexpm/elixir:1.13.1-erlang-24.2-alpine-3.14.2 15.3s
------
 > [internal] load metadata for docker.io/library/alpine:3.14.2:
------
Error failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Falpine%3Apull&service=registry.docker.io": net/http: TLS handshake timeout

```

I’m running `flyctl` on WSL 2.0 with Ubuntu 18.04 if that helps.

Thank you!

---

<div class="post-metadata">

**Author:** ![Ali\_Makki](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Ali\_Makki](https://community.fly.io/u/Ali_Makki)\
**Post date:** [January 7, 2022, 5:31pm UTC](https://community.fly.io/t/flyctl-deploy-tls-handshake-timeout/3622/2 "2022-01-07T17:31:11Z")

</div>

I seem to have worked around the issue by using the --remote-only flag as part of the deploy args.

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [January 8, 2022, 7:12pm UTC](https://community.fly.io/t/flyctl-deploy-tls-handshake-timeout/3622/3 "2022-01-08T19:12:16Z")

</div>

That’s a good workaround! I’m guessing there was a transient network issue breaking image pushes yesterday. If it crops up again, let us know (but feel free to keep using remote builds if you’d rather).

---

<div class="post-metadata">

**Author:** ![kazungu](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kazungu/32/2112_2.png) [@kazungu](https://community.fly.io/u/kazungu)\
**Post date:** [January 15, 2022, 1:52pm UTC](https://community.fly.io/t/flyctl-deploy-tls-handshake-timeout/3622/4 "2022-01-15T13:52:06Z")

</div>

I am experiencing the same issue even after using the --remote-only flag.
