cancel
Showing results for 
Search instead for 
Did you mean: 

error No org or space targeted, use 'cf target -o ORG -s SPACE'

imransyed
Explorer
0 Kudos

Hello Colleagues,

I have setup a trial account for CF and trying to login using command prompt. I am getting error while logging in

Error : No org or space targeted, use 'cf target -o ORG -s SPACE'

I have noticed that API endpoints are different in Command prompt and SCP

API Endpoint in SCP : https://api.cf.us10.hana.ondemand.com

API Endpoint set by default when we enter 'cf login ahttps://api.cf.us10.hana.ondemand.com'

is https://api.cf.ca10.hana.ondemand.com

Please suggest

imransyed
Explorer
0 Kudos

Hi Sudip,

Thanks for the answer, I am trying to follow the steps mentioned in below link

https://developers.sap.com/tutorials/cp-cf-download-cli.html

spaces and org are available in my trial subaccount

Accepted Solutions (1)

Accepted Solutions (1)

sudipghosh
Active Contributor

Hello Imran,

First make sure you have created org and space. Then use below commands to login through cf cli like below, you can see i have used cf login -a <api endpoint>

My Sub accounts look like below

Org and space look like below

I hope this would help.

Regards.

Sudip

yash_vijay
Explorer
0 Kudos

Hi sudip.ghosh4,

Good Morning,

I have tried your solution but it still not showing the orgs.

I am working in the trial account.

Please guide me.

Answers (0)