Configure WiFi from outside

Can you pull the card and put into another linux machine

Edit
/etc/wpa_supplicant/wpa_supplicant.conf

country=GB 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="Your SSID"
    psk="YourWPAPassword"
    key_mgmt=WPA-PSK
}

change country to the country you are in

Then type sync…eject the volume, then boot the pi

Also might need to add the line

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

To either the /etc/network/interfaces line in the wlan0 section (look for the entry for your wlan0)