I am unable to use the API token when configuring my Bitbucket Cloud account in Xcode. I was able to successfully create an API token but when I paste it into Xcode as the Password field for my account, I get an error that "Your account or password is incorrect". I was able to use the App Passwords just fine with Xcode but the API token doesn't work.
Can you help me get this working?
G'day Allen!
To start using API tokens - you'll need to create the API token and specify the scope - this is mentioned in our deprecation documentation:
Click the gear cog icon, select Atlassian Account settings > Security tab > Create and manage API Tokens
Click Create API token with scopes and select Bitbucket Cloud
If you want to be able to clone/push/pull to the repository - you'll need to tick both read:repository:bitbucket and write:repository:bitbucket - clone only would just be read:repository:bitbucket. More information on scopes can be found in our API scopes documentation.
Perform the clone using the API token by updating the remote URL in Xcode to either of the formats below - it should use Basic auth:
If you're still unable to use the API token, I'd recommend reaching out to the Xcode forums for further support:
Cheers!
- Ben (Bitbucket Cloud Support)
Hi @Ben
I'm facing probably the same issue as @allenu does... it's not the cloning thats the problem rather the authentication in Xcode itself.
For example when adding a SPM Package hosted on a private bitbucket repository you have to authenticate somehow. Previously this was possible via App Passwords and this functionality unfortunatelly seems to be no longer available on bitbucket.org.
I've tried several ways mentioned above... using https://token:APIToken@bitbucket.org/bla/bla or https://username:token@bitbucket.org did not work.
In Xcode there is an option, to add a bitbucket server with an api token but this did not work neither. No matter what credentials i added in there i get the response "too many HTTP redirects".
TL;DR; it is currently not possible to get Swift Packages in Xcode Projects working or have you been able to solve the issue @allenu?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey guys, this will also be a breaking change for us :/ We distribute a few SDKs through SPM using https://username:token@bitbucket.org/ format URLs to authenticate in Xcode.
If this doesn't work anymore, what's the alternative?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.