将Xcode项目推送到GitHub时出现身份验证问题 [英] Authentification issue when pushing Xcode project to GitHub

查看:157
本文介绍了将Xcode项目推送到GitHub时出现身份验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想通过Xcode将我的项目推送到GitHub时遇到了一个问题。

注意,我不是在这里谈论终端。我必须为我的团队中的艺术家设置Xcode环境。终端不为他工作......



我尝试在开始时使用HTTPS地址(https://github.com/zeroliu/DumplingJump.git)总是收到一个403认证错误。


错误:请求的网址在返回
https://github.com/zeroliu/DumplingJump.git/info/refs 致命错误:HTTP
请求失败


到处搜索,我发现GitHub实际上只接受SSH方式。
但奇怪的是,我可以使用HTTPS方式通过终端推送我的项目...我不认为这种说法是正确的。



无论如何,然后我尝试了SSH方式,但它也不起作用。 Xcode要求我输入我的用户名和密码,但无论我尝试了多少次,它都不起作用。我认为问题来自Xcode本身,因为SSH地址的格式为git@github.com:Organization / Repository.git,Xcode愚蠢地认为用户名是git,但不是Organization ......并且当我更改用户在推送项目时,Xcode会自动用我的用户名替换git,这会将地址更改为Organization@github.com:Organization / Repository.git。这应该是我无法通过SSH访问的原因。



您是否有人成功通过Xcode将项目推送到GitHub?
真的需要你的帮助! Mega Thanks !!!

解决方案

我总是将github URL设置为:



pre $ b

这对安全性不利,但我浪费了足够的时间尝试让SSH与多个密钥对一起工作,并且我不能每次都打扰我的用户名/密码。

b $ b

I encountered a problem when I wanted to push my project to GitHub via Xcode.

Attention, I am not talking about terminal here. I have to set the Xcode environment for the artist in my team. Terminal is not working for him...

I tried to use the HTTPS address (https://github.com/zeroliu/DumplingJump.git) at the beginning but always receives a 403 authentification error.

error: The requested URL returned error: 403 while accessing https://github.com/zeroliu/DumplingJump.git/info/refs fatal: HTTP request failed

By searching everywhere, I found that GitHub actually only accept SSH way. But weirdly, I can use HTTPS way to push my project via Terminal...I don't think that statement is right.

Anyway, then I tried the SSH way but it is also not working. Xcode asked me to type in my username and password but no matter how many times I tried, it was just not working. I think the problem comes from Xcode itself, since the SSH address is in form of git@github.com:Organization/Repository.git, Xcode stupidly considers the user name is git, but not Organization...and as I change the user name when pushing the project, Xcode will automatically replace "git" by my username, which changes the address to Organization@github.com:Organization/Repository.git. That should be the reason why I can not get the access via SSH.

Does anyone of you succeed in pushing the project to GitHub via Xcode? Really need your help!! Mega Thanks!!!

解决方案

I always set the github URL to:

https://username:password@github.com/username/Whatever.git

Which is bad for security, but I've wasted enough time trying to get SSH to work with multiple key pairs and I cannot be bothered to type my username/password every time.

这篇关于将Xcode项目推送到GitHub时出现身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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