xcode 如何解决意外的 HTTP 状态码:404(-1)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35004990/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:27:48  来源:igfitidea点击:

How to solve Unexpected HTTP status code: 404(-1)

xcodeswifthttpgithub

提问by kylel95

Although I set up my xcode swift file to create a repository when I click SourceControl -> Make a Working Copy I receive the error window "All projects are already under source control. Then when I to Window -> Welcome to Xcode -> "Check out an existing project" I get the error "Unexpected HTTP status code: 404(-1). Does anyone have an idea on how to solve this please? Thank you

虽然我在单击 SourceControl -> 制作工作副本时设置了我的 xcode swift 文件以创建存储库,但我收到错误窗口“所有项目都已在源代码管理之下。然后当我打开窗口时 -> 欢迎使用 Xcode ->”检查退出现有项目”我收到错误“意外的 HTTP 状态代码:404(-1)。有没有人知道如何解决这个问题?谢谢

回答by Michael

When you use Welcome to XCode > Check out an existing projectyou need to enter the github repository url as provided on the <> Codetab in github. It will look something like

当您使用时,Welcome to XCode > Check out an existing project您需要输入 github 中的<> Code选项卡上提供的 github 存储库 url 。它看起来像

    https://github.com/username/MyRepository.git

回答by htafoya

In my case I got -401 with the following premises:

在我的情况下,我得到了 -401 的以下前提:

  • The URL was OK
  • The user credentials were OK
  • However, the user was not approved for downloading from that repository
  • 网址没问题
  • 用户凭据正常
  • 但是,用户未被批准从该存储库下载

Using the correct user solved the issue.

使用正确的用户解决了这个问题。

回答by Brendon Moss

I got this issue when using xcode with bitbucket service.

我在使用 xcode 和 bitbucket 服务时遇到了这个问题。

Not entirely sure if I changed something or bitbucket changed something but I noticed that my domain in the URI for the remote had changed in bitbucket and xcode was no longer attempting to push to the correct path.

不完全确定我是否更改了某些内容或 bitbucket 更改了某些内容,但我注意到我在远程 URI 中的域在 bitbucket 中已更改,并且 xcode 不再尝试推送到正确的路径。

eg.

例如。

domain/repo.git

域/repo.git

for some reason now was:

出于某种原因,现在是:

domaincom/repo.git

domaincom/repo.git

again, I do not remember changing anything but perhaps something changed in bitbucket to alter how the usernames are formed?

再说一次,我不记得改变了什么,但也许在 bitbucket 中改变了一些东西来改变用户名的形成方式?

I think my team ( username ) was domain.com and they always worked with the first part up until the first . but perhaps changes have allowed for their service to remove all dots and use the full team name ( username )

我认为我的团队(用户名)是 domain.com,他们一直在处理第一部分直到第一部分。但也许更改允许他们的服务删除所有点并使用完整的团队名称(用户名)

I removed and re added the remote using the correct URI and it worked.

我使用正确的 URI 删除并重新添加了遥控器,它工作正常。

回答by Jacobo Koenig

In my case, the issue was with my bitbucket plan which had exceeded the free plan tier and was restricted to read-only. Fixed my plan in bitbucket, and the issue was solved after a while.

就我而言,问题出在我的 bitbucket 计划上,该计划超出了免费计划层并且仅限于只读。在bitbucket中修复了我的计划,一段时间后问题解决了。