Bitbucket + XCode 4.2 + Git [英] Bitbucket + XCode 4.2 + Git

查看:110
本文介绍了Bitbucket + XCode 4.2 + Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



大家都知道,XCode 4.2带有git支持。
我创建了一个bitbucket帐户,并且想将我的更改推送到我的存储库,

我按照本教程
https://confluence.atlassian.com/display/BITBUCKET/Use+ + SSH +协议+ + Bitbucket



然而这是我面临的问题。
当我在主办单位 - XCode的存储库部分时,我进入我的远程文件夹并创建一个存储库。



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



然而,当我询问名称和密码时,我提供的用户名和密码失败。我也尝试用git作为用户,但没有运气。



更新:



我已创建一个〜/ .ssh / config文件,我为bitbucket添加了一个特定的配置。

 主机bitbucket.org 
HostName bitbucket.org
IdentityFile〜/ .ssh / bitbucket
用户名

我用ssh -T git@bitbucket.org
测试过它,它可以正常工作,它得到认证。



然而,当我用XCode我得到了以下错误。
验证失败,因为名称或密码不正确。



我知道我在这里缺少一些东西。



更新2:



我设法解决了这个问题,但只能从命令行解决,而不是从XCode解决。
我会稍后发布我的解决方案,但如果您有办法从XCode中完成,请随时发布。 解决方案

它通过使用HTTPS URI为我工作,但我需要从中删除我的用户名。例如更改:



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





https://bitbucket.org/username/myrepo.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://git@bitbucket.org/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 git@bitbucket.org 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

解决方案

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

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

to

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

then supply your username and password when prompted.

这篇关于Bitbucket + XCode 4.2 + Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆