无痛!xcode连接github

  1. Create a new repo on GitHub (ensure you have configured your ssh keys on your mac well with GitHub)
  2. Create a new project using Xcode, placing it into local ~/git/ folder
  3. In Xcode, choose menu Source Control | {project} - master | Configure {project} ...
  4. In the dialog box | Remotes, click “+” | Add Remote … to add a new remote with:
    Name: origin
    Address: [email protected]:hmisty/{project}.git
  5. In Xcode, choose menu Source Control | Push …
  6. In the dialog box, it says Push local changes to origin/master (Create). Just click Push.
  7. In the prompt dialog for entering your credentials for the repository ‘{project}’ on host ‘github.com’, choose:
    Authentication: SSH Keys
    User Name: / Public Key: / Private Key: are all loaded successfully and you cannot change them.
    Passphrase: type in your passphrase here.
    Click OK.
  8. Done. Painless.

你可能感兴趣的:(无痛!xcode连接github)