Using Git integration
Before you can enable Git version control for an existing local project, or clone a Git project from a remote repository, do the following:
- Download and install Git.
- In the Settings/Preferences dialog (⌘,), select Version Control | Git in the left pane and specify the path to the Git executable.
- Set passwords for remote Git repositories
Set passwords for Git remotes
Every time you interact with a remote Git repository (for example, during a pull, update, or push operation), it requires authorization. You can configure AppCode to remember your passwords, so that you do not have to specify your credentials each time authorization is required. The type of authentication depends on which network protocol is used by the remote repository you are trying to access: HTTP or SSH.
If you are using HTTP to access a remote, Git requests credentials from a credential helper when you perform an operation that requires authentication. If no credential helper is found, it returns a prompt to the IDE. If you have configured a password policy, AppCode looks for credentials in the passwords database. If there is no passwords database, it displays a prompt and you have to enter your login and password.
If your remote uses the SSH protocol, in addition to configuring a password policy, you can choose whether you want to use a native or a built-in SSH executable. To do this, in the Settings/Preferences dialog (⌘,), select Version Control | Git on the left. From the SSH executable drop-down list, select one of the following options:
- Built-in: all authorization is performed on the IDE side.
- If login and password are used for authentication, authorization is performed in accordance with the selected password policy.
- If an SSH key without a passphrase is used for authentication, AppCode will access the
~/.ssh/configfile and get the key from there.
- If authentication requires an SSH key with a passphrase, Git looks for it in the credential helper, and, if no credential helper is found, it returns a prompt to the IDE. If you have configured a password policy, AppCode looks for credentials in the passwords database. If there is no passwords database, it displays a prompt and you have to enter SSH key and a passphrase.
- Native: all authorization is performed on Git side. No prompt will be displayed, so choose this authorization type if you are using SSH without a passphrase, or the passphrase is saved in a credentials helper, or there is an SSH agent.
Configure a password policy
- In the Preferences dialog (⌘,), select Appearance and Behavior | System Settings | Passwords on the left.
- Select how you want AppCode to process passwords for Git remote repositories:
- In native Keychain: select this option to use native Keychain to store your passwords. This setting is only available for MacOS and Linux.
- In KeePass: select this option to use the KeePass password manager to store your passwords. When you use the KeePass password manager, a master password will be used to access the file that stores individual passwords. Once AppCode remembers your passwords, it will not ask for them unless you need to access the passwords database. Enter the password that will be used to access the
c.kdbxfile in the MasterPassword field.
You can change the default location of the
c.kdbxfile in the Database field.
To import a
c.kdbxfile, click and select Import from the drop-down menu, or click and specify the path to a local file containing your passwords.
If you want to remove the existing passwords from the database, select Clear.
- Do not save, forget passwords after restart: select this option if you want your passwords to be reset after you close AppCode.