我安装的git似乎已损坏,看起来我的开发人员工具已损坏。
当我尝试运行git时,出现此错误。/ usr / bin / git和/ opt / local / bin / git(从MacPorts)都发生这种情况:
cook47@rcmac (RC_bash_lib (master)): /usr/bin/git pull
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
我已经运行Xcode并同意许可。我尝试运行xcode-select --install
并遇到另一个错误:
cook47-a@rcmac (current_projects): sudo xcode-select --install
Password:
xcode-select: error: no developer tools were found, and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.
远程存储库不成问题;
搜索此错误之后,我从Apple下载了OS X 10.9.5和XCode 6.2的commandlinetools安装程序。安装成功。但是,git仍然被破坏并且xcode-select --install
仍然给出相同的错误。
我也尝试过xcodebuild -license
,但确实提示我同意该协议,但是在同意后,没有任何更改。还是坏了。
这让我完全难住了。昨天工作了!我在政府环境中工作,在此环境中可能有更新更改了某些内容,因此我无法确定到底有什么更改。
有人知道我如何才能再次使用git吗?我尝试nuking并重新安装Xcode和命令行工具,但无济于事。MacPorts中的git和/ usr / bin / git都给出相同的错误消息。
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
重新安装Xcode后您是否运行了?另外,Xcode本身是否可以工作(并构建项目)?git是否可以在Xcode中使用?