dmtucker / config

Personal Environment
MIT License
1 stars 2 forks source link

protocol version mismatch -- is your shell clean? #113

Closed tucked closed 4 years ago

tucked commented 4 years ago
rsync -av --dry-run some/file remotehost:~/
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2]

man rsync sheds light on this:

rsync occasionally produces error messages that may seem a little cryptic. The one that seems to cause the most confusion is "protocol version mismatch -- is your shell clean?".

This message is usually caused by your startup scripts or remote shell facility producing unwanted garbage on the stream that rsync is using for its transport. The way to diagnose this problem is to run your remote shell like this:

   ssh remotehost /bin/true > out.dat

then look at out.dat. If everything is working correctly then out.dat should be a zero length file. If you are getting the above error from rsync then you will probably find that out.dat contains some text or data.

cat out.dat produces:

$TERM (dumb) does not appear to support 256 colors.

https://github.com/dmtucker/config/blob/ff63fe94510f3b76010f3f0bf37fcd9708026756/config/bashrc.bash#L6 That belongs on stderr.

522kritesh commented 3 years ago

hi , any one help me plz how to resolve this issue ?????

rsync -yrzhe 'sshpass -p '\''xxxxxxx'\'' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ' --exclude .git/ --exclude application/config/config.php --exclude application/config/database.php --exclude .htaccess . lmsadmin@xxxxxxxxxx:/home/lmsadmin/public_html Warning: Permanently added '115.124.98.243' (ECDSA) to the list of known hosts. protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2] Build step 'Execute shell' marked build as failure Finished: FAILURE how to resolve this issue ,

522kritesh commented 3 years ago
rsync -av --dry-run some/file remotehost:~/
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2]

man rsync sheds light on this:

rsync occasionally produces error messages that may seem a little cryptic. The one that seems to cause the most confusion is "protocol version mismatch -- is your shell clean?". This message is usually caused by your startup scripts or remote shell facility producing unwanted garbage on the stream that rsync is using for its transport. The way to diagnose this problem is to run your remote shell like this:

   ssh remotehost /bin/true > out.dat

then look at out.dat. If everything is working correctly then out.dat should be a zero length file. If you are getting the above error from rsync then you will probably find that out.dat contains some text or data.

cat out.dat produces:

$TERM (dumb) does not appear to support 256 colors.

https://github.com/dmtucker/config/blob/ff63fe94510f3b76010f3f0bf37fcd9708026756/config/bashrc.bash#L6

That belongs on stderr.

bro how to resolved this issue can you help me i am facing same issue in jenkins pipeline