Skip to main content
added 608 characters in body
Source Link
Ctrl-C
  • 241
  • 2
  • 8

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.

I wonder if your command doesn't need an additional fix:

ssh [email protected] bash -c "cd /dbhandler/dbhandler && git pull"

^ I don't think your path should be there when executing commands. With bash -c "some-commands" you can circumvent this.

Edit:

After clarification it seems that a good solution is mounting Mac's project folder on Linux machine and use git there, while doing everything else on Mac. You can do it by using SSHFS: https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

My preferred solution would be upgrading your Mac's git so it supports SSL 1.2. If there's no update for Mac yet, you can try compiling it yourself and installing the compiled version.

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.

I wonder if your command doesn't need an additional fix:

ssh [email protected] bash -c "cd /dbhandler/dbhandler && git pull"

^ I don't think your path should be there when executing commands. With bash -c "some-commands" you can circumvent this.

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.

I wonder if your command doesn't need an additional fix:

ssh [email protected] bash -c "cd /dbhandler/dbhandler && git pull"

^ I don't think your path should be there when executing commands. With bash -c "some-commands" you can circumvent this.

Edit:

After clarification it seems that a good solution is mounting Mac's project folder on Linux machine and use git there, while doing everything else on Mac. You can do it by using SSHFS: https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

My preferred solution would be upgrading your Mac's git so it supports SSL 1.2. If there's no update for Mac yet, you can try compiling it yourself and installing the compiled version.

added 265 characters in body
Source Link
Ctrl-C
  • 241
  • 2
  • 8

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.

I wonder if your command doesn't need an additional fix:

ssh [email protected] bash -c "cd /dbhandler/dbhandler && git pull"

^ I don't think your path should be there when executing commands. With bash -c "some-commands" you can circumvent this.

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.

I wonder if your command doesn't need an additional fix:

ssh [email protected] bash -c "cd /dbhandler/dbhandler && git pull"

^ I don't think your path should be there when executing commands. With bash -c "some-commands" you can circumvent this.

Source Link
Ctrl-C
  • 241
  • 2
  • 8

< is an operator to redirect a file as an input. git pull is a command, not a file. You can do it like this:

echo "git pull" | ssh [email protected]:/dbhandler/dbhandler

Or the correct way:

ssh [email protected]:/dbhandler/dbhandler git pull

Take a look at possible invocations in man ssh:

ssh (...) [user@]hostname [command]

You have an optional command there.