Still have this issue in 8.1.2 with Google Apps Oauth.  I solved it by 
renaming the problem user's username and email, and having them login via 
Oauth.  Then login to the postgres db (omniauth)

sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h 
/var/opt/gitlab/postgresql -d gitlabhq_production

Find the problem user's user id (now renamed) and the new user's id, 
(select id from users where username = 'X';).  Then find the identity of 
the new user's oauth (select * from identities where user_id = <new user 
id>).  Then move the new identity to the problem user ( update identities 
set user_id = <old user id> where id = <identity of new user id>).  Then 
rename the old user back to the original username/email and delete the new 
user.  The original user should now be able to login via oauth.

On Tuesday, November 25, 2014 at 7:56:38 PM UTC-5, James Riordon wrote:
>
> Albeit a bit late in the game, we encountered this same issue in Gitlab 
> 7.5.1. The update shown here did not work for us. We had to update the 
> users setting the provider to the short name of our provider, and the 
> extern_uid had to match the user ID supplied by the authenticating server. 
> Not an issue as we use our own provider, but no idea how this would work 
> for Github users.  Hope this helps someone. 
>
> - James
>
>
> On Sunday, November 17, 2013 10:47:14 PM UTC-5, Kenny Garland wrote:
>>
>> After some trial and error I had to do the following for a fix:
>>
>> Empty the authentication_token, extern_uid and provider columns.
>>
>> update users set authentication_token=NULL,extern_uid=NULL,provider=NULL 
>> where username='testuser';
>>
>> After that, you need to have the user login and go into their Account 
>> settings. Then click on the Authenticate with Google icon, it will generate 
>> the values for the above information.
>>
>> On Friday, November 15, 2013 3:49:06 PM UTC-5, Kenny Garland wrote:
>>>
>>> I have this exact same issue.
>>>
>>>
>>>
>>> On Friday, October 25, 2013 2:36:04 PM UTC-4, Andrew wrote:
>>>>
>>>> Our GitLab setup initially used the built in authentication methods. 
>>>>  After the 6.0 released, we migrated to an OAuth solution.  After the 
>>>> migration, users who had already existed were able to log in using the new 
>>>> OAuth service and their accounts would be automatically merged.  After the 
>>>> upgrade to 6.1, users who have an existing internal account and try to 
>>>> login with a matching OAuth account receive an error "422 Unpronounceable 
>>>> Entity."  The production.log file shows that this is an 
>>>> ActiveRecord::RecordInvalid error: "Validation failed: Email has already 
>>>> been taken, Username has already been taken, Username already exist)."
>>>>
>>>> Is anyone else experiencing this problem?
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/f85b54ba-e1fd-4527-9faf-ac47c8ef8e20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to