TransWikia.com

Setting the username globally for sfdx, how do I change it back?

Salesforce Asked by akarnid on October 4, 2021

My situation now is that I went ahead and did some changes I shouldn’t have done to my sfdx config and now both my default username and my devhubusername are set to my production user, and both are global values. So when I open up the scratch org, it launches the production Salesforce instead of a scratch org, which is what I want.
how do I unset this? My config right now when issuing sfdx force:config:list –json is

"key": "defaultdevhubusername",
  "location": "Global",
  "value": "*production user name*"
},
{
  "key": "defaultusername",
  "location": "Global",
  "value": "*production user name*"

Obviously not an ideal situation.

2 Answers

In addition to the answer by @Phil W. If you want to remove the global value of defaultdevhubusername. you can reset it using the below command.

sfdx force:config:set defaultdevhubusername= -g

It will clear the value.

Correct answer by Rahul Gawale on October 4, 2021

Use the config commands:

sfdx force:config:set [email protected] [email protected] -g

With the -g you set your globals. Setting them "blank" clears the (global) setting (thanks for the reminder Rahul!).

Answered by Phil W on October 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP