Windows command prompt doesn't handle single quate in CLI properly

Solution Verified - Updated -

Issue

  • I use oc commnad on windows Command prompt, then I get following error.
  $ oc rsync foo bar:/tmp --strategy='tar'
  error: unknown strategy: 'tar'
  • Problem with executing oc exec on windows Openshift client
C:\Users\abc>oc exec -ti mlbparks-mongodb-1-gzsm9 -- bash -c 'mongo -u mlbaprks -p mlbparks mlbparks'

-u: -c: line 0: unexpected EOF while looking for matching `''

-u: -c: line 1: syntax error: unexpected end of file

error: error executing remote command: Error executing command in container: Error executing in Docker Container: 1

Environment

  • OpenShift Enterprise
    • v3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content