I am using Keycloak (version 1.0.4.Final)
in JBOSS AS 7.1.1
I was running the key cloak inside a docker container, The keycloak command line tool was avaialble inside the keycloak container.
docker exec -it {contaierID} bash
cd keycloak/bin
./kcadm.sh config credentials --server http://localhost:8080/auth --realm master --user admin
./kcadm.sh update realms/master -s sslRequired=NONE
If the admin user is not created, then the user can be created via this command.
./add-user-keycloak.sh --server http://ip_address_of_the_server:8080/admin --realm master --user admin --password adminPassword