1

I have a weird issue that I can't seem to find an answer for.

When I enter:

git config --global http.proxy http://{username}:{password}@{proxy address}:{port}/

It returns an error:

git config --global http.proxy http://{username}:mount /dev/cdrom /media/cdrom{password}@{proxy address}:{port}/

I do have an !1 in the password field that seems to be getting replaced and the rest of the password is echoing.

I had a look is !1 is a shortcut to /dev/cdrom but couldn't find anything.

2

Yes, in an interactive shell, ! is the last command line, and it's quite possible !1 is the first word of it, etc. (Can you tell it's not a feature I use?) Just put the whole proxy url in single quotes like

git config --global http.proxy 'http://{username}:{password}@{proxy address}:{port}/'

(You'll see similar effects with $ and anything that's a shell wildcard like ? or *: the command line doesn't know what's a file name parameter.)

  • I thought I tried that but I realise I was using " not ' and it was still returning the same error – Ahhhhhhhhhhhhhdfgbv Oct 11 '18 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.