Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git signed commits #6324

Merged
merged 17 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
| Feature | Description |
|---|---|
| [**Keyboard shortcuts**](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) | You can access a variety of [commands and actions](/docs/cloud/dbt-cloud-ide/keyboard-shortcuts) in the IDE by choosing the appropriate keyboard shortcut. Use the shortcuts for common tasks like building modified models or resuming builds from the last failure. |
| **IDE version control** | The IDE version control section and git button allow you to apply the concept of [version control](/docs/collaborate/git/version-control-basics) to your project directly into the IDE. <br /><br /> - Create or change branches, execute git commands using the git button.<br /> - Commit or revert individual files by right-clicking the edited file<br /> - [Resolve merge conflicts](/docs/collaborate/git/merge-conflicts)<br /> - Link to the repo directly by clicking the branch name <br /> - Edit, format, or lint files and execute dbt commands in your primary protected branch, and commit to a new branch.<br /> - Use Git diff view to view what has been changed in a file before you make a pull request.<br /> - From dbt version 1.6 and higher, use the **Prune branches** [button](/docs/cloud/dbt-cloud-ide/ide-user-interface#prune-branches-modal) to delete local branches that have been deleted from the remote repository, keeping your branch management tidy. |
| **IDE version control** | The IDE version control section and git button allow you to apply the concept of [version control](/docs/collaborate/git/version-control-basics) to your project directly into the IDE. <br /><br /> - Create or change branches, execute git commands using the git button.<br /> - Commit or revert individual files by right-clicking the edited file<br /> - [Resolve merge conflicts](/docs/collaborate/git/merge-conflicts)<br /> - Link to the repo directly by clicking the branch name <br /> - Edit, format, or lint files and execute dbt commands in your primary protected branch, and commit to a new branch.<br /> - Use Git diff view to view what has been changed in a file before you make a pull request.<br /> - Use the **Prune branches** [button](/docs/cloud/dbt-cloud-ide/ide-user-interface#prune-branches-modal) (dbt v1.6 and higher) to delete local branches that have been deleted from the remote repository, keeping your branch management tidy.<br /> - Sign your [git commits](/docs/cloud/dbt-cloud-ide/git-commit-signing) to verify and mark them as 'Verified'. <Lifecycle status="enterprise" /> |

Check warning on line 56 in website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md#L56

[custom.UIElements] UI elements like 'Edit' should be bold.
Raw output
{"message": "[custom.UIElements] UI elements like 'Edit' should be bold.", "location": {"path": "website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md", "range": {"start": {"line": 56, "column": 518}}}, "severity": "WARNING"}

Check warning on line 56 in website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md#L56

[custom.Typos] Oops there's a typo -- did you really mean 'v1.6'?
Raw output
{"message": "[custom.Typos] Oops there's a typo -- did you really mean 'v1.6'? ", "location": {"path": "website/docs/docs/cloud/dbt-cloud-ide/develop-in-the-cloud.md", "range": {"start": {"line": 56, "column": 847}}}, "severity": "WARNING"}
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
| **Preview and Compile button** | You can [compile or preview](/docs/cloud/dbt-cloud-ide/ide-user-interface#console-section) code, a snippet of dbt code, or one of your dbt models after editing and saving. |
| [**dbt Copilot**](/docs/cloud/dbt-copilot) <Lifecycle status='beta' />| A powerful AI engine that can generate documentation, tests, and semantic models for your dbt SQL models. Available for dbt Cloud Enterprise plans. |
| **Build, test, and run button** | Build, test, and run your project with a button click or by using the Cloud IDE command bar.
Expand Down
64 changes: 64 additions & 0 deletions website/docs/docs/cloud/dbt-cloud-ide/git-commit-signing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "Git commit signing"
description: "Learn how to sign your Git commits when using the IDE for development."
sidebar_label: Git commit signing
---

# Git commit signing <Lifecycle status="Enterprise" />

To improve identity protection/impersonation and enhance security, you can sign your Git commits when pushing them to the repository. Using your signature, a Git provider can cryptographically verify it and mark the commit as "verified", giving people increased confidence about the origin of the commit.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

You can configure dbt Cloud to sign your Git commits when using the IDE for development. To set up, enable the feature in dbt Cloud, generate a GPG keypair, and upload the public key to your Git provider to use for signature verification.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved


## Prerequisites

- GitHub or GitLab is your Git provider. Currently, Azure DevOps is not supported.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
- You have a dbt Cloud account on the [Enterprise plan](https://www.getdbt.com/pricing/).
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

## Generate GPG keypair in dbt Cloud

To generate a GPG keypair in dbt Cloud, follow these steps:
1. Go to your **Personal profile** page in dbt Cloud.

Check warning on line 22 in website/docs/docs/cloud/dbt-cloud-ide/git-commit-signing.md

View workflow job for this annotation

GitHub Actions / vale

[vale] website/docs/docs/cloud/dbt-cloud-ide/git-commit-signing.md#L22

[custom.UIElements] UI elements like 'Personal profile' should be bold.
Raw output
{"message": "[custom.UIElements] UI elements like 'Personal profile' should be bold.", "location": {"path": "website/docs/docs/cloud/dbt-cloud-ide/git-commit-signing.md", "range": {"start": {"line": 22, "column": 17}}}, "severity": "WARNING"}
2. Navigate to **Signed Commits** section.
3. Enable the **Sign commits originating from this user** toggle to generate a GPG key.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
4. This will generate a GPG keypair and display the public key. You can copy the public key to upload it to your Git provider. Make sure to keep the private key secure.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

<Lightbox src="/img/docs/dbt-cloud/example-git-signed-commits-setting.png" width="95%" title="Example of profile setting Signed commits" />

## Upload public key to Git provider

To upload the public key to your Git provider, follow the detailed documentation provided by the supported Git provider:

- [GitHub instructions](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)
- [GitLab instructions](https://docs.gitlab.com/ee/user/project/repository/signed_commits/gpg.html)

Once you have uploaded the public key to your Git provider, your Git commits will be signed with the GPG keypair generated in dbt Cloud after you push the changes to the repository.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

<Lightbox src="/img/docs/dbt-cloud/git-sign-verified.jpg" width="95%" title="Example of a verified Git commit in a Git provider." />

## Considerations

- The GPG keypair is tied to the user, not a specific account. There is a 1:1 relationship between the user and keypair. The same key will be used for signing commits on any accounts the user is a member of.
- The GPG key generated in dbt Cloud is linked to the email address associated with your account at the time of key creation. This email identifies the author of signed commits.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
- For your Git commits to be marked as "verified", your dbt Cloud email address must be a verified email address with your Git provider. The Git provider (such as, GitHub, GitLab) checks that the commit's signed email matches a verified email in your Git provider account. If they don’t match, the commit won't be marked as "verified."
- Keep you dbt Cloud email and Git provider's verified email in sync to avoid verification issues. If you change your email address:
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
- Generate a new GPG keypair with the updated email, following the [steps mentioned earlier](/docs/cloud/dbt-cloud-ide/git-commit-signing#generate-gpg-keypair-in-dbt-cloud).
- Or add and verify the new email in your Git provider.
runleonarun marked this conversation as resolved.
Show resolved Hide resolved

<!-- vale off -->

## FAQs

<!-- vale on -->

<DetailsToggle alt_header="What happens if I delete my GPG keypair in dbt Cloud?">

If you delete your GPG keypair in dbt Cloud, your Git commits will no longer be signed. You can generate a new GPG keypair by following the [steps mentioned earlier](/docs/cloud/dbt-cloud-ide/git-commit-signing#generate-gpg-keypair-in-dbt-cloud).
</DetailsToggle>

<DetailsToggle alt_header="What if my Git provider doesn't support GPG keys?">

Currently, GitHub or GitLab are supported Git providers for git commit signing (Azure DevOps is not supported). If your Git provider doesn't support GPG keys, you won't be able to sign your Git commits. You can still commit code to your repository, but the commits won't be marked as "verified".
runleonarun marked this conversation as resolved.
Show resolved Hide resolved
</DetailsToggle>

1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ const sidebarSettings = {
"docs/cloud/dbt-cloud-ide/keyboard-shortcuts",
"docs/cloud/dbt-cloud-ide/ide-user-interface",
"docs/cloud/dbt-cloud-ide/lint-format",
"docs/cloud/dbt-cloud-ide/git-commit-signing",
{
type: "category",
label: "dbt Copilot",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading