Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbucket + XCode 4.2 + Git

I've been looking for a solution with Bitbucket and XCode.

As everybody knows, XCode 4.2 comes with git support. I've created a bitbucket account and I wanted to push my changes to my repository,

I've followed this tutorial https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket

However this is the problem I'm facing. When I'm in the Organizer - Repositories Section at XCode, I go to my remotes folder and create a repository.

ssh://[email protected]/username/myrepo.git

However when I'm asked for Name and password, the ones I provide as username and password fails. I've also tried with git as a user but no luck.

UPDATE:

I've created a ~/.ssh/config file where I've added a specific configuration for bitbucket.

Host bitbucket.org
HostName bitbucket.org
IdentityFile ~/.ssh/bitbucket
User username

I've tested it with ssh -T [email protected] and It works, it gets authenticated.

However, when I test this with XCode I got the following error. "Authentication failed because the name or password was incorrect."

I know I'm missing something here.

UPDATE 2:

I've managed to solve the issue but only from command line, not from XCode. I'll post my solution later but feel free if you have a way to do it from XCode

Thanks

like image 304
raul782 Avatar asked Nov 15 '11 04:11

raul782


People also ask

Can you use Git with bitbucket?

Git's ability to communicate with remote repositories (in your case, Bitbucket is the remote repository) is the foundation of every Git-based collaboration workflow. Git's collaboration model gives every developer their own copy of the repository, complete with its own local history and branch structure.


3 Answers

It worked for me by using the HTTPS URI, but I needed to remove my user name from it. For example change:

https://[email protected]/username/myrepo.git

to

https://bitbucket.org/username/myrepo.git

then supply your username and password when prompted.

like image 143
trolley Avatar answered Nov 06 '22 16:11

trolley


Removing the username did not work for me. But I was able to solve the issue by adding my password like this to the URL:

https://username:[email protected]/username/myrepo.git

like image 20
Gil Margolin Avatar answered Nov 06 '22 15:11

Gil Margolin


I was able to use the XCode UI by using the https URL and entering my bitbucket username and password when prompted.

like image 4
Simon Avatar answered Nov 06 '22 16:11

Simon