【发布时间】:2018-03-16 07:38:58
【问题描述】:
我刚刚从旧系统向 bitbucket 存储库添加了一个应用程序。效果很好,但是我在将它克隆到我的新系统(运行 Xcode 9 的 MacBook Pro)时遇到了问题。要克隆它,到目前为止,我已经按照以下步骤操作:
1. Open Xcode, select "Source Control", then "Clone".
2. Paste the bitbucket address into the address.
3. After the verification, it displays the address, type (git) and Login (defaults to "anonymous")
4. Select "User name and Password" instead of "anonymous".
5. It displays a username which is the name of the project and grayed out, and a password.
6. Since I can't enter the username for my bitbucket account (my email address), I alway get an "authentication failed".
我根据谷歌的一些建议尝试了以下方法,但到目前为止没有运气:
git config --global user.name "myname"
git config --global user.email "myemail"
xcrun git config --global user.name 'myname'
xcrun git config --global user.email 'myemail'
有什么想法吗?我只需要能够更改用户名来克隆它,但它是灰色的。
【问题讨论】:
-
你粘贴在哪个地址? (请随意匿名。)
-
地址是在下载图标旁边的 bitbucket 站点中给出的地址,上面写着“git clone myprojectname@bitbucket.org/myprojectnam/myappname.git”。 Xcode 对话框中提供的名称是“myprojectname”,但这不是我登录 bitbucket 时使用的名称(这是我的电子邮件地址)。需要明确的是,我粘贴的地址是myprojectname@bitbucket.org/myprojectname/myappname.git,但我也尝试过myprojectname@bitbucket.org/myprojectname/myappname 和myprojectname@bitbucket.org/myprojectname,但没有成功。
-
电子邮件地址不是用户名。用户名是用户名。单击左侧的头像图标并转到您的个人资料;您的用户名是“bitbucket.org/”之后的任何内容。
-
所以,我的用户名与项目名称相同,这就是 Xcode 对话框中提供的用户名。但是,这不是我登录 bitbucket 时使用的名称,因此无论如何身份验证都会失败。我是否必须更改我的登录名/电子邮件地址以匹配我的用户名/项目名称?如果我不提供登录名,Xcode 如何进行身份验证?
-
有没有办法可以授予我的电子邮件地址克隆权限?
标签: git bitbucket clone xcode9