Upload error (Raspberry pi/ Navio2 )

make emlid_navio2_cross upload
[0/1] uploading px4
ssh: Could not resolve hostname : Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
FAILED: boards/emlid/navio2/CMakeFiles/upload
cd /home/john/Documents/Test1/Firmware/build/emlid_navio2_cross/boards/emlid/navio2 && rsync -arh --progress /home/john/Documents/Test1/Firmware/build/emlid_navio2_cross /home/john/Documents/Test1/Firmware/posix-configs/rpi/*.config /home/john/Documents/Test1/Firmware/ROMFS pi@"":/home/pi
ninja: build stopped: subcommand failed.
Makefile:193: recipe for target ‘emlid_navio2_cross’ failed
make: *** [emlid_navio2_cross] Error 1

I keep getting this error whenever i run: make emlid_navio2_cross upload
I’ve tried export
But still i keep getting that error

I ran into the same problem. If you didn’t set AUTOPILOT_HOST before building the source, it will cache the empty value into the outputs. Do a distclean, set AUTOPILOT_HOST to a hostname (e.g. or navio.local) and then rebuild and upload.

My steps:
export AUTOPILOT_HOST=hostname
make distclean
make emlid_navio2_cross upload

Hope this helps.