OS X EI Capitan 10.11.1更新後,Xcode Git Remote 連不上?

我們在開發iOS App有用到Git來做版控,同時也是方便Team work,用了最簡單的方式來架設Git的遠端環境。就是找一台Mac來當remote主機,每台開發Mac使用SSH的方式連入。
設定簡單,而且remote就在自家,也不用擔心放到雲端會有資料外洩的風險。
沒想到今天在那台Mac上不小心把OS X更新到10.11.1之後,所有的開發機就不能再用Git push pull的功能了。只好開始找問題了:

1. 由開發Mac來SSH remote, 其實是正常的,而且xxx.git目錄也都存在
2. 但由開發Mac的Xcode, Source Control -> Push卻出現連不上remote的錯誤訊息

想想,就ssh到remote,cd 到xxx.git
然後

$ git


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


$ sudo git
Password:


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

Apple Inc.

Xcode and Apple SDKs Agreement

PLEASE SCROLL DOWN AND READ ALL OF THE FOLLOWING TERMS AND CONDITIONS CAREFULLY BEFORE USING THE APPLE SOFTWARE OR APPLE SERVICES.  THIS IS A LEGAL AGREEMENT BETWEEN YOU AND APPLE.  IF YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS, CLICK THE “AGREE” BUTTON.  BY CLICKING “AGREE” OR BY DOWNLOADING, USING OR COPYING ANY PART OF THIS APPLE SOFTWARE OR USING ANY PART OF THE APPLE SERVICES, YOU ARE AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO THE TERMS AND CONDITIONS STATED BELOW.  IF YOU DO NOT OR CANNOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU CANNOT USE THIS APPLE SOFTWARE OR THE APPLE SERVICES.  DO NOT DOWNLOAD OR USE THIS APPLE SOFTWARE OR APPLE SERVICES IN THAT CASE.

1.      Definitions
Whenever capitalized in this Agreement:

“Agreement” means this Xcode and Apple SDKs Agreement.

“Apple” means Apple Inc., a California corporation with its principal place of business at One Infinite Loop, Cupertino, California 95014, U.S.A.

“Apple Developer Program License Agreement” means a separate agreement that may be entered into between You and Apple regarding the development and submission of Applications to the App Store for approval and digital signing by Apple, development of libraries for iOS, watchOS, and/or tvOS, and the use of Apple services such as the Apple Push Notification Service, In-App Purchase, and iCloud, among other things.

“Apple Maps Service” means the mapping platform and Map Data provided by Apple via the MapKit API (which is the documented API that enables You to add mapping features or functionality to Applications).  

“Apple Services” or “Services” means the developer services that Apple provides to You under this Agreement solely for use with Your Applications and not for use by You as an end-user (e.g., Game Center, Apple Maps Service, any Apple-certificate issuance services, etc.), including any Updates thereto (if any) that may be provided to You by Apple.  

“Apple Software” means the Xcode Developer Tools and the Apple SDKs, including any Updates thereto (if any) that may be provided to You by Apple.

“Apple SDKs” means the Mac SDK, and the Apple-proprietary Software Development Kits (SDKs) provided hereunder, including but not limited to header files, APIs, libraries, simulators, and software (source code and object code) labeled as part of the iOS SDK, watchOS SDK and/or tvOS SDK and included in the Xcode Developer Tools package for purposes of targeting Apple-branded products running iOS, watchOS, or tvOS.

“Application” means a software program (including extensions and media that are enclosed in a single software bundle) developed by You hereunder, for use under Your own name, trademark or brand, and specifically for use on Apple-branded products running OS X, iOS, watchOS, tvOS, as applicable, including new releases and new versions of such software program, but excluding libraries for iOS, watchOS, or tvOS applications.  

For clarity, the term Application as used in this Agreement excludes libraries that are for use in Applications designed for iOS, watchOS, or tvOS.  Such libraries can be developed by You only under the terms of the Apple Developer Program License Agreement.  

“Authorized Developers” means Your employees and contractors, members of Your organization or, if You are an educational institution, Your faculty, staff and students, who: (a) have a demonstrable need to know or use the Apple Software or Apple Services in order to develop and test Applications, and (b) to the extent they will access Apple Confidential Information, have written and binding agreements with You that prohibit the unauthorized use and disclosure of such confidential information.

“Authorized Test Units” means Apple-branded hardware units owned or controlled by You that have been designated by You for Your own testing and development purposes, and, if You permit, Apple-branded hardware units owned or controlled by Your Authorized Developers so long as such units are used for testing and development purposes on Your behalf and only as permitted hereunder. 

“Documentation” means the technical or other specifications or documentation that Apple may provide to You for use in connection with the Apple Software, Apple Services, Apple certificates, or as otherwise provided hereunder. 

“FOSS” (Free and Open Source Software) means any software that is subject to terms that, as a condition of use, copying, modification or redistribution, require such software and/or derivative works thereof to be disclosed or distributed in source code form, to be licensed for the purpose of making derivative works, or to be redistributed free of charge, including without limitation software distributed under the GNU General Public License or GNU Lesser/Library GPL.

“Mac SDK” means the Apple-proprietary Software Development Kits (SDKs) provided hereunder, including but not limited to header files, APIs, libraries, simulators, and software (source code and object code) labeled as part of the Mac SDK and included in the Xcode Developer Tools package for purposes of targeting Apple-branded products running OS X.

“Map Data” means any content, data or information provided through the Apple Maps Service including, but not limited to, imagery, terrain data, latitude and longitude coordinates, transit data, points of interest and traffic data. 

“Program Requirements” mean the technical, human interface, design, product category, security, performance, and other criteria and requirements for Applications specified by Apple in the Apple Developer Program License Agreement.  

“Provisioning Profiles” means the time-limited files (including applicable entitlements, certificates or other identifiers) that may be provided by Apple for use by You in connection with Your Application development and testing.

“Updates” means bug fixes, updates, upgrades, modifications, enhancements and supplements to the Apple Software or Apple Services, and any new releases or versions thereof.

“Xcode Developer Tools” means the Apple-proprietary development platform, including but not limited to software tools, compilers, sample code, Documentation, programming languages, and overall design package provided by Apple hereunder, excluding the Apple SDKs.

“You” or “Your” means the person(s) or entity using the Apple Software or Services or otherwise exercising rights under this Agreement.  If You are entering into this Agreement on behalf of Your company, organization, educational institution, or an agency, instrumentality, or department of the federal government, “You” or “Your” refers to your company, organization, educational institution or agency, instrumentality, or department of the federal government as well.

2.      Internal Use License and Restrictions
2.1     Authority to Enter into Agreements 
You certify to Apple that You have the right and authority to enter into this Agreement on Your own behalf, or if You are entering into this Agreement on behalf of Your company, organization, educational institution, or agency, instrumentality, or department of the federal government, that You have the right and authority to legally bind such entity or organization to the terms and obligations of this Agreement.  Further, You agree to comply with the terms of and fulfill Your obligations under this Agreement, including obtaining any required consents for Your Authorized Developers’ use of the Apple Software and Services (e.g., as part of Your Applications), and You agree to monitor and be fully responsible for all such use by Your Authorized Developers and their compliance with the terms of this Agreement.  You acknowledge that You will be solely responsible for all costs, expenses, losses and liabilities incurred, and activities undertaken by You and Your Authorized Developers in connection with the Apple Software and Apple Services, Your Applications and Your related development and limited distribution efforts.  


By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree

You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf

usage: git [--version] [--help] [-C ] [-c name=value]
           [--exec-path[=]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=] [--work-tree=] [--namespace=]
           []

The most commonly used git commands are:
   add        Add file contents to the index
   bisect     Find by binary search the change that introduced a bug
   branch     List, create, or delete branches
   checkout   Switch branches or restore working tree files
   clone      Clone a repository into a new directory
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   fetch      Download objects and refs from another repository
   grep       Print lines matching a pattern
   init       Create an empty Git repository or reinitialize an existing one
   log        Show commit logs
   merge      Join two or more development histories together
   mv         Move or rename a file, a directory, or a symlink
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects
   rebase     Forward-port local commits to the updated upstream head
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index
   show       Show various types of objects
   status     Show the working tree status
   tag        Create, list, delete or verify a tag object signed with GPG

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help ' or 'git help '
to read about a specific subcommand or concept.

然後,再去Xcode, Source Control -> Push, 結果就成功了。

原來是Apple的版權問題。

留言

這個網誌中的熱門文章

D-BUS學習筆記

關於藍牙裝置找尋(inquiry, scan)兩三事

Cisco Switch學習筆記: EtherChannel