Git issue after moving from resin to balena

Hello,

I had a resin.io project which worked fine. If I now try to push the project I have git issues. Any suggestions?

 [Info]     Dashboard link: https://dashboard.balena-cloud.com/apps/1298225/devices
[Info]     Building on arm02
[Info]     Pulling previous images for caching purposes...
[Success]  Successfully pulled cache images
[main]     Step 1/9 : FROM resin/raspberrypi3-node:6-slim
[main]      ---> 7fe2e8c1402b
[main]     Step 2/9 : RUN apt-get update && apt-get install -yq git python2.7 bluetooth bluez libbluetooth-dev libudev-dev bluez-firmware && ln -s /usr/bin/python2.7 /usr/bin/python && apt-get install build-essential curl && apt-get install -y dnsmasq wireless-tools && apt-get clean && rm -rf /var/lib/apt/lists/*
[main]     Using cache
[main]      ---> c13518b3f978
[main]     Step 3/9 : WORKDIR /usr/src/app
[main]     Using cache
[main]      ---> afdbeeab0c6b
[main]     Step 4/9 : RUN curl https://api.github.com/repos/resin-io/resin-wifi-connect/releases/latest -s     | grep -hoP 'browser_download_url": "\K.*armv7hf\.tar\.gz'     | xargs -n1 curl -Ls     | tar -xvz -C /usr/src/app/
[main]      ---> Running in b307836edf2c
[main]     curl: no URL specified!
[main]     curl: try 'curl --help' or 'curl --manual' for more information
[main]     
[main]     
[main]     gzip: stdin: unexpected end of file
[main]     
[main]     tar: Child returned status 1
[main]     tar: Error is not recoverable: exiting now
[main]     
[main]     Removing intermediate container b307836edf2c
[main]     The command '/bin/sh -c curl https://api.github.com/repos/resin-io/resin-wifi-connect/releases/latest -s     | grep -hoP 'browser_download_url": "\K.*armv7hf\.tar\.gz'     | xargs -n1 curl -Ls     | tar -xvz -C /usr/src/app/' returned a non-zero code: 2
[Info]     Uploading images
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: The command '/bin/sh -c curl https://api.github.com/repos/resin-io/resin-wifi-connect/releases/latest -s     | grep -hoP 'browser_download_url": "\K.*armv7hf\.tar\.gz'     | xargs -n1 curl -Ls     | tar -xvz -C /usr/src/app/' returned a non-zero code: 2
[Error]    Not deploying release.

remote: error: hook declined to update refs/heads/master
To git.balena-cloud.com:bogerssande_r/tcy-fleet1.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to `

Hi @sanderb, the way you call curl does not follow redirects, can you try with curl -L, which should work?

Hi @sanderb did this solve your issue? Let us know if you’re still having trouble.

I’m sorry. Yes, this answer solved the issue. Thank you