Rsync errors on windows with DeltaCopy - windows

Previously I got this working on my workstation, but since I formatted it, rsync stopped to work.
I already reinstalled git and deltacopy a couple of times.
Also had registered rsync as a service on windows.
Every time I ran the command, I got these errors.
If I type a wrong password, I get access denied, so the connection is ok.
C:\\> rsync -v -rlt -z --chmod=a=rw,Da+x --delete
"/cygdrive/C/P21 Sistemas/web/apache/local.sdt21/sdt21/"
"root#sdt21.com.br:/home/sdt21/homologacao/www/sdt21/"
root#sdt21.com.br's password: *********
dup() in/out/err failed
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at
/home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/io.c(791) [sender=3.0.4]**

The problem is with the ".
The quote is a known issue on Windows.
In order to override the problem install cygwin & rsync:
See: Using rsync and cygwin to Sync Files from a Linux Server to a Windows Notebook PC
And then write your command in a shell script and execute it.

Related

cannot open display from macos client with openvpn

I am trying to connect to a redhat server from a macos client, using ssh and openvpn. Command line commands work fine (eg vim), but displays dont get displayed, eg while running firefox or gvim, and I get the error:
No protocol specified
E233: cannot open display
I did "xhost +" and "export XAUTHORITY=~/.Xauthority" on the macos client, and "export DISPLAY=:0.0" on the redhat server, but that did not solve the problem.
However, it is working when the client is ubuntu, so I guess the problem is on the macos client side.
BTW, when I run ssh after I did "xhost +", I get the warning:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Any suggestions?
Answer is given here: instead of doing "ssh -X", do "ssh -Y". This is the short solution (which worked for me on Catalina + XQuartz), other longer solutions are also provided at this link.

Command not found: ssh OpenSSH not found on your computer

I'm trying to set up Ionic pro. But it gives an error.Any help?
I have installed Git Bash.But still, it shows above error. Why?
May we proceed? Yes
ionic ssh generate C:\Users\lokuge.ssh\ionic\4460 [ERROR] Command not found: ssh [WARN] OpenSSH not found on your computer. [INFO] You
will be prompted to provide a passphrase, which is used to protect
your private key should you lose it. (If
someone has your private key, they can impersonate you!) Passphrases are recommended, but not required. 'ssh-keygen' is not
recognized as an internal or external command, operable program or
batch file. [ERROR] Command not found: ssh-keygen
Simple: install SSH
Since you seem to be on Windows, I suggest getting Git Bash. That ships with OpenSSH. Oh, and Git, obviously.
Edit, because the solution is actually in the comments:
You have to run whatever command is causing the error in Visual Studio from within the actual Bash shipped with Git Bash. Simply installing Git Bash but running the command from within VS does not work, as VS assumedly uses a different terminal emulator.
I have the same issue, I have downloaded and configure ssh via cygwin I'm i going to use Cygwin to run ionic pro instead of cmd, because while i run ionic pro on cmd i have an error of : ionic ssh setup
[WARN] OpenSSH not found on your computer.
[ERROR] Command not found: ssh

git on Windows: fatal: protocol error: bad line character: #-

I was using SourceTree + Git on Windows without any problem. I was able to use git commands from command (terminal/BASH). I prefer to use terminal for git push/pull etc. Unfortunately, after reinstallation of my machine (server/git are the same), I'm getting this painful error.
On a new machine, I installed Git 1.9.5 (Git-1.9.5-preview20141217.exe) and configured to use BASH only and plink with proper SSH key file.
I can do git log on my repository, but git pull or git push gives this error:
me#NEW-MACHINE /c/Workspace/project (master)
$ git pull
fatal: protocol error: bad line length character:
#-
ERROR: Problem parsing the command line arguments.
Of course, I searched many articles related to "fatal: protocol error: bad line length character". But, couldn't find any clue.
Interestingly, on SourceTree, I can do git pull or push successfully. I'm only getting this error in BASH terminal. Note that SourceTree doesn't use embedded git.
Here are my investigations so far:
I installed an older version of git (1.8.x), still getting error.
Moved .bashrc, but no good.
Obviously, not a problem of SourceTree as SourceTree doesn't use embedded Git.
The server is in Github (enterprise, private).
I have no problem using any git commands on my Linux with the same git repository/server.
My clue is <newline>#-<newline> from the error message. It is more like a problem of Windows/BASH-specific problem. I can't figure it out what causes "#-".
Edit: I tried suggestions in this thread, but didn't solve my problem. The git server is github.mycompany.com, which doesn't allow any ssh connection.
You can circumvent the bash-ssh issue entirely by:
launching a DOS shell with git-cmd.bat (packaged within your Git for Windows msysgit distribution)
using git clone to make a new clone using the proper https url of your remote repo.
That is:
git clone https://<yourAccount>#github.mycompany.com/<yourAccount>/<yourRepo>
Since you will be using in this case the https protocol, there won't be any shell session during a git pull (as opposed to the ssh protocol: see The Smart Protocols), and you shouldn't see any extra message like fatal: protocol error: bad line length character.
I had same issue for git in windows.
Load your public/private key by Pageant App (Putty Authentication Agent).
add private/public key.

Gitolite intermittent issue: 'bad interpreter: Permission denied'

I have an issue when TeamCity connects to the git server. We use gitolite
Error message
Failed for the root 'myroot' #84: List remote refs failed: org.eclipse.jgit.errors.NoRemoteRepositoryException: git#mygitserver:repo.git: bash: /home/git/.gitolite/src/gl-auth-command: /usr/bin/perl: bad interpreter: Permission denied
This issue occurs intermittently.
Do you have any ideas how can I identify and fix the root cause?
Check if any of the perl script have a ^M (in which case a dos2unix would fix it).
But for the permission denied part, as in this thread, check if the partition is being mounted noexec (mount).
Especially the /tmp one, which can be used (or not used) depending on gitolite operation.
sudo mount -o remount,exec /tmp

error: cannot run ssh: No such file or directory when trying to clone on windows

I am trying to clone a remote repository on Windows, but when I did this:
git clone git#github.com:organization/xxx.git
I got this error:
error: cannot run ssh: No such file or directory
fatal: unable to fork
Am I missing something?
Check if you have installed ssh-client. This solves the problem on docker machines, even when ssh keys are present:
apt-get install openssh-client
You don't have ssh installed (or don't have it within your search path).
You can clone from github via http, too:
git clone http://github.com/organization/xxx
Most likely your GIT_SSH_COMMAND is referencing the incorrect public key.
Try:
export GIT_SSH_COMMAND="ssh -i /home/murphyslaw/.ssh/your-key.id_rsa
then
git clone git#github.com:organization/xxx.git
I am aware that it is an old topic, but having this problem recently, I want to bring here what I resolve my issue.
You might have this error on these conditions :
You use a URL like this : git#github.com:organization/repo.git
And you run a kind of command like this directly : git clone git#github.com/xxxxx.git whereas you don't have ssh client (or it is not present on path)
Or you have an ssh client installed (and git clone xxx.git work fine on direct command line) but when you run the same kind of command through a shell script file
Here, I assume that you don't want to change protocol ssh git# to http://
(git#github.com:organization/repo.git -> http://github.com/organization/repo.git), like my case, cause I needed the ssh format.
So,
If you do not have ssh client, first of all, you need to install it
If you have this error only when you execute it through a script, then you need to set GIT_SSH_COMMAND variable with your public ssh key, in front of your git command, like this :
GIT_SSH_COMMAND="/usr/bin/ssh -i ~/.ssh/id_rsa" git pull
(Feel free to change it depending on your context)
I had this issue right after my antivirus moved the cygwin ssh binary to virus vault, and restored it after.
Symptoms:
SSH seems properly installed
SSH can be run from command line without problem
Another option before reinstalling ssh in this particular case: check the ssh command permissions
$ ls -al /usr/bin/ssh.exe
----rwxrwx+
$ chmod 770 /usr/bin/ssh.exe
You can try these as well
ssh-add ~/.ssh/identity_file
chmod 400 ~/.ssh/identity_file
It so happened in my case that the new pair of ssh keys linked with my git account were not accessible.
I had to sudo chmod 777 ~/.ssh/id_rsa.* to resolve the issue.

Resources