This one nearly brought me to panic - tried everything, reinstalled Xcode, rebooted, nothing working. But through sheer will and perseverance I found the way through...
Here's what worked-
If you are presented with the dialog asking for username and password - first of all, it is the Mac user you want - the administrator for your computer, NOT the apple developer id.
Second - you may have to enter the user/password MULTIPLE TIMES. The same dialog will appear multiple times, just keep entering your user/password until it goes away. You will know if you entered the wrong user/password because the dialog shakes & jiggles. If it does not, you are entering it correctly and will get to the end of this.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags: