无法从 xcode 7 推送到 gitlab [英] Cannot push to gitlab from xcode 7
问题描述
升级到 Xcode 7 的一个不愉快的副作用是我无法再推送到我的 Gitlab 存储库.在过去的两年里,我一直在毫无问题地推动和退出我的项目,所以我怀疑 Xcode 7 正在做一些不同的事情.我已经通过 Web 界面登录和退出了 Gitlab 验证了我的 u/p.当我转到 Xcode > Preferences > Accounts 时,选择 gitlab 项目,我看到用户名和密码在那里(就像他们已经使用了 2 年一样)并且我验证它们是正确的.
One unhappy side effect of upgrading to Xcode 7 is that I can no longer push to my Gitlab repo. I have been pushing and pulling from my project without problem for the last two years, so I suspect Xcode 7 is doing something different. I have verified my u/p for Gitlab by logging into and out of it via the web interface. When I go to Xcode > Preferences > Accounts, select the gitlab project, I see that the username and password are in there (just like they have been for 2 years) and I verify that they are correct.
值得注意的是,我可以从终端成功发布,但是,我不希望使用终端定期将我的代码推送到 Gitlab.升级后有没有其他人遇到过这个问题?有关修复的任何建议?
It is worth noting that I can successfully post from Terminal, however, I do not wish to use Terminal to push my code to Gitlab on a regular basis. Has anyone else encountered this problem since upgrading? Any suggestions as to a fix?
我得到的具体错误是身份验证失败,因为用户名或密码不正确."此错误出现在帐户"对话框中,以及尝试推送到 gitlab 存储库之后.
The specific error I am getting is "Authentication failed because the user name or password was incorrect." This error appears in the Accounts dialog, as well as after trying to perform a push to the gitlab repo.
推荐答案
所以这个是一个相当难对付的问题,老实说,我不确定这个错误的根本原因是什么,但是我解决的方法是这样的:
So this one was quite a bear to wrestle, and to be honest, I am not sure what the root cause of this error was, but the way I resolved it was this:
- 从 GitLab 中删除了我的旧 ssh 密钥
- 在命令行上创建了一个新的 ssh 密钥,然后将其添加到 GitLab 中
- 从 Xcode > Preferences > Accounts 中删除了 GitLab 存储库
- 使用 SSH 密钥选项重新添加了 GitLab 帐户(以前也是,这不是新的)
- 关闭 Xcode
- 炸掉项目的工作目录
- 打开 Xcode,然后选择 Source Control > Checkout
- 提供了 SSH 地址(您可以从项目文件夹中的 GitLab 获取)
- 为了测试 Push 的能力,对项目做了一个小的改动
- 通过 Xcode 源代码管理推送到 GitLab > 推送
瞧!工作.这绝对是核选项,但它让我再次工作.我坚信将 Xcode 升级到 7 会搞砸一些事情.如果其他人有这个问题,我希望这能解决它!
Voila! Worked. This was definitely the nuclear option but it got me working again. I firmly believe that upgrading Xcode to 7 screwed something up. If anyone else has this problem I hope this resolves it!
这篇关于无法从 xcode 7 推送到 gitlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!