Xcode 13/14 Regression: Git Source Control: Cannot push, results in error "username does not match previous request"

Hi,

I reported this issue a while back for Xcode 12, which I then marked as resolved because it intermittently worked: https://developer.apple.com/forums/thread/652855

However, since Xcode 13, even in Xcode 14 RC 2, Git pushing to a custom server just does not work for me at all anymore. I get the following error:

An unknown error occurred
username does not match previous requests (-1)

Feedback ID: FB9812942

Thank you, Matthias

Replies

This problem has plagued me for a bunch of years also. Recently I found the following "workaround":

I would get the error if the config file for the project had a URL of the form:

url = ssh:userid@//hostname/path-to-project

however if I remove the userid from this string then Xcode will prompt me for the userid/password:

url = ssh://hostname/path-to-project

This also will work for cloning the project from within Xcode, just enter the string:

ssh://hostname/path-to-project

It might cause problems with issuing git commands from a command shell because it will use the current userid added to the string.

  • Switching ssh keys from ecdsa-sha2 to rsa on that git user fixed the issue for me.

Add a Comment