|
| 1 | +# Configuring Remotes |
| 2 | + |
| 3 | +This guide covers how to configure and interact with remote repositories in Embedded Git using the settings page. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Git and Embedded Git installed on the server |
| 8 | +- A remote repository (e.g., GitHub, GitLab, Bitbucket) |
| 9 | +- Access to the Embedded Git settings page on the instance: https://hostname:port/prefix/isc/studio/usertemplates/gitsourcecontrol/gitprojectsettings.csp |
| 10 | + |
| 11 | +## Option 1: Configuring SSH authentication with a GitHub deploy key |
| 12 | + |
| 13 | +This option is best for shared development environments using GitHub. |
| 14 | +1. Enter a filename in the SSH Private Key File input of the settings form. Save the form. |
| 15 | +2. Click the "File not found - generate a new key pair?" button. Save the form. |
| 16 | +3. Copy the value of the "Public key" input on the settings page. |
| 17 | +4. In GitHub, go to repository settings > Deploy keys > Add deploy key. Paste the value from the previous step into the key. Check "Allow write access". Save the new key. |
| 18 | +5. In GitHub, copy the link to clone the repository via SSH. |
| 19 | +6. In Embedded Git settings, click the "Clone" button and paste the SSH repository URL into the confirmation dialog. |
| 20 | + |
| 21 | +## Option 2: Configuring SSH authentication with a personal SSH key |
| 22 | + |
| 23 | +This option is best for individual development environments using any remote that supports SSH authentication. |
| 24 | + |
| 25 | +Follow the steps for Option 1, but instead of adding the public key as a deploy key to the repository, add it to the SSH keys for your individual user on the Git remote. For example in GitHub here: https://github.com/settings/ssh/new |
| 26 | + |
| 27 | +## Option 3: Configuring HTTPS authentication with a personal access token |
| 28 | + |
| 29 | +This option is best for individual development environments using GitHub where SSH access to the remote is not permitted from the development server. |
| 30 | + |
| 31 | +1. In the GitHub repository, go to Settings > Developer Settings > Personal Access Tokens > Tokens (classic) > Generate new token (classic) |
| 32 | +2. Give the new token scope "repo". Click "Generate Token" |
| 33 | +3. Copy the token - it looks like ghp_abunchoflettersandnumbers |
| 34 | +4. In the Embedded Git settings page, click the "Clone" button. Include the personal access token in the remote URL like this: https://my-github-username:ghp_abunchoflettersandnumbers@github.com/org/repo.git |
| 35 | + |
| 36 | +## Option 4: Configuring HTTPS authentication with a project access token |
| 37 | + |
| 38 | +This option is best for shared development environments using GitLab where SSH access to the remote is not permitted from the development server. |
| 39 | +1. In GitLab, go to repository settings > Access Tokens > Add new token |
| 40 | +2. Give the token permissions to read and write the repository. |
| 41 | +3. Copy the token and save it somewhere secure. |
| 42 | +4. In the Embedded Git settings page, click the "Clone" button. Include the project access token in the URL like this: https://git:pastetokenhere@my-gitlab-tenant.example.com/org/repo.git |
| 43 | + |
| 44 | +## Frequently Asked Questions |
| 45 | + |
| 46 | +### How do I verify that my remote connection is working? |
| 47 | + |
| 48 | +After configuring your remote, refresh the Embedded Git settings page. The "Remote Repository" input should display the remote URL with a "Connection successful" message underneath. If you see an error message instead, review your authentication settings. |
| 49 | + |
| 50 | +### If multiple developers are pushing changes with the same deploy key or access token, will they all look like they came from the same user? |
| 51 | + |
| 52 | +In the git repository history, each commit will still be attributed to the individual user who made the commit. |
| 53 | + |
| 54 | +### My firewall blocks outgoing traffic on port 22. Can I still use SSH authentication? |
| 55 | + |
| 56 | +For GitHub specifically, you may be able to enable SSH connections over HTTPS following this guide: https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port. That involves making some changes to an SSH config file. To force Embedded Git to use a specific config file, edit the "Path to SSH Config File" input on the Embedded Git settings page. |
0 commit comments