0

alias-list works with -l username_2

rhc alias-list blog -l username_2

wheras

rhc alias-add blog www.somedomain.com -l username_2

doesn't take into account -l username2 it will create alias for username_1 instead

How to add alias to account 2 ?

timo.rieber
  • 3,727
  • 3
  • 32
  • 47
user310291
  • 36,946
  • 82
  • 271
  • 487

2 Answers2

1

Hmm.. thats strange. There is express.conf file in User home ~/.openshift directory. This file has a property called default_rhlogin. Try changing this property with username_2 and check if this works.

Shekhar
  • 5,771
  • 10
  • 42
  • 48
  • I changed to username_2 in for default_rhlogin (I'm on Windows 8 Pro). When I use alias-list it says no alias which is true, when I tried to add an alias it says already added : so it refers to username_1 because it's true I added this alias to username_1 seems like a bug for me or maybe alias is global. Will delete from username_1 first... – user310291 Apr 28 '14 at 08:39
  • can you run rhc setup command with username_2. Like rhc setup -l username_2 – Shekhar Apr 28 '14 at 08:40
  • OK will test that. Otherwise by removing alias from username_1 and changing default_rhlogin to username_2 I could finally add alias to username_2 – user310291 Apr 28 '14 at 08:46
  • When rhc setup -l username_2 it changed default_rhlogin to username_2 – user310291 Apr 28 '14 at 08:49
  • So it's ok for me now. Thanks for your help with default_rhlogin. – user310291 Apr 28 '14 at 08:49
1

So I just ran into a similar problem and heres what it was for me. For some reason rhc only understood what i was trying to do once I switched to the folder with the app/account I wanted to deal with. Even though I had logged out of the previous account and ran rhc setup for the second account (and included the -l option), it was still looking for the domain of the first account.

So to make it work I had to cd to the folder containing the app I was trying to alias (as well as actually switching to the right account with logout, and setup or -l). After that it worked perfectly for me. Hope this helps.

S McCrohan
  • 6,663
  • 1
  • 30
  • 39
Jemar Jones
  • 1,491
  • 2
  • 21
  • 27