Steps to reproduce
- In Sourcetree go to Remote > Accounts... > Add...
- Select one of the GitLab hosts (I'm using GitLab Enterprise) and provide a URL if required
- Enter username and password
- Select the HTTPS protocol (per the comments in the question linked below this also happens if using SSH)
- Click "Save"
Result
The following dialog always appears:
Login error
We couldn't connect to GitLab Enterprise with your (<your_username>) credentials. Check your username and try the password again.
Environment
I am encountering this on Sourcetree 4.0 (229) on macOS 10.14.6
Additional information
As in the comments to this question: there was a set of steps which would resolve this issue in Sourcetree versions prior to circa 3.1.2 (216 or 225) but from that point on the UI changed and it was not possible to follow these steps, or possibly these steps never worked on the Mac Sourcetree application.
In particular, there is now nowhere in the Sourcetree UI where it is possible to load or specify a Private Token once one has been generated in GitLab.
That question is marked as Resolved and thus no further assistance has been provided there, so I am opening a new question to get help with the problem in its current form.