Failed to connect to the host via ssh: command-line line 0: garbage at end of line;

Hello,

I tried to fill in a bug report, but it seems it’s more a question than a bug :

Since I’ve added a business dropbox to my existing personnal dropbox, ansible cannot read my symlinked inventory file anymore and always return an error :

`

    "msg": "Failed to connect to the host via ssh: command-line line 0: garbage at end of line; \"(Personnelle)/OSX/mackup/.ansible/cp/eead3d7599\".\r\n", 

`

What did happen ?

How can I get rid of this issue ?

Can you please paste your code then it makes more sense.

According to its something with paths that are passed on without proper escaping or quoting,

Sure ! That’s why I was linking the bug report, but here is the command I use :

`

ansible chaos -m ping

`

And here is the error I get back :

`

As per my understanding ControlPath=/Users/loranger/Dropbox (Personnelle)/OSX/mackup/.ansible/cp/eead3d7599’ the space between dropbox and (Personnelle) is giving you error. set up a symlink or path with no spaces. Is that make any sense.

Thank you for your reply.

I too believe the issue comes from this space, but I didn’t manage anything :

Adding a business dropbox created the new dropbox, moved the existing one to its new name and symlinked it to the old existing path :

lrwxr-xr-x 1 loranger staff 37 16 oct 09:30 Dropbox -> /Users/loranger/Dropbox (Personnelle) drwx------@ 21 loranger staff 672 18 oct 18:28 Dropbox (DuJour) drwx------@ 34 loranger staff 1088 18 oct 09:43 Dropbox (Personnelle) d

I’m not sure what I can do here, and why the space seems to be unescaped as it should be

ls -la .ansible lrwxr-xr-x 1 loranger staff 43 12 mai 11:06 .ansible -> /Users/loranger/Dropbox/OSX/mackup/.ansible

Laurent Goussard [25.10.2017 10:14]:

Thank you for your reply.

I too believe the issue comes from this space, but I didn't manage anything
:

Adding a business dropbox created the new dropbox, moved the existing one
to its new name and symlinked it to the old existing path :
lrwxr-xr-x 1 loranger staff 37 16 oct 09:30 Dropbox -> /Users/
loranger/Dropbox (Personnelle)
drwx------@ 21 loranger staff 672 18 oct 18:28 Dropbox (DuJour)
drwx------@ 34 loranger staff 1088 18 oct 09:43 Dropbox (Personnelle)
d

I'm not sure what I can do here, and why the space seems to be unescaped as
it should be

ls -la .ansible
lrwxr-xr-x 1 loranger staff 43 12 mai 11:06 .ansible -> /Users/loranger/
Dropbox/OSX/mackup/.ansible

So, in your configuration you use ~/Dropbox, and ansible expands this
syslink to ~/"Dropbox (personelle)", for some reason without quoting it.

Is there any cance that you rename "Dropbox (personelle)" to something
like "Dropbox_(personelle)" or "Dropbox_personelle" to avoid spaces (and
parentheses)?

The best solution would be ansible using quotes with file paths, but to
get this you should open a bug with ansible and post your case as an
example why ;).

Werner

Thanks for you support

I tried to rename my folder, but each time Dropbox.app is started, it force-rename the dropboxes and breaks everything again.
I also tried to fill in a bug report, but my issue was closed as they consider it as a user question.

I’m stuck :confused:

Laurent Goussard [25.10.2017 15:05]:

Thanks for you support

I tried to rename my folder, but each time Dropbox.app is started, it
force-rename the dropboxes and breaks everything again.
I also tried to fill in a bug report, but my issue was closed as they
consider it as a user question.

I'm stuck :confused:

Laurent,

I suggest you manually create a new folder, named like
Dropbox_personelle, and tell the dropbox instance that currently syncs
with "Dropbox (personelle)" to use Dropbox_personelle instead. This way,
you should have all content of "Dropbox (personelle)" at the new place,
too (after a short time). Later, you might delete it from "Dropbox
(personelle)" because that folder is no longer in use. Or you keep it as
a backup :wink:

Do not forget to redirect the ~/Dropbox symlink to the new folder :wink:

Werner

I could not figure out how to choose another folder from dropbox, so I quit the dropbox app, renamed the faulty dropbox folder to ~/Dropbox and created a symlink from ~/Dropbox (Personnelle) to ~/Dropbox

It’s a crappy workaround, but it works.

Meanwhile I did open a new issue and tried to reach the Dropbox support regarding this problem.

Whereas it’s definitely a Dropbox’s fault to use such non-unix compliant pathes, I’m astonished I’m the only one with this kind of “space bug”

Thanks again for your help, Werner & Zimidar !

Laurent,

yesterday, my Dropbox app did not want to work, today, it does.

When I left-click on the Dropbox icon and choose "Preferences...", there
is a tab "Sync". In the lower part of this tab there is "Dropbox
location", where I read "Choose a location for your Dropbox. A folder
named 'Dropbox' will be created inside the folder you choose." This
might be the point to choose another folder.

I'm not sure whether anyone alse uses Dropbox to store configuration
files. Usually, Ansible will be used from inside a company's intranet,
and so there are other possibilities to share files or to have them
available from multiple workplaces.

I'm glad you reached your goal, though just using a workaround, and that
my writing could be of any use.

Werner

Laurent Goussard [25.10.2017 22:37]: