Errors and troubleshooting for Databricks Git folders

Follow the guidance below to respond to common error messages or to troubleshoot issues with Databricks Git folders.

Invalid credentials

Try the following:

  • Confirm that the Git integration settings (Settings > Linked accounts) are correct.

    • You must enter both your Git provider username and token.

  • Confirm that you have selected the correct Git provider in **Settings** > **Linked accounts**.

  • Ensure your personal access token or app password has the correct repo access.

  • If SSO is enabled on your Git provider, authorize your tokens for SSO.

  • Test your token with the Git command line. Replace the text strings in angle brackets:

    git clone https://<username>:<personal-access-token>@github.com/<org>/<repo-name>.git
    

Secure connection...SSL problems

This error occurs if your Git server is not accessible from Databricks. To access a private Git server get in touch with your Databricks account team

<link>: Secure connection to <link> could not be established because of SSL problems

Timeout errors

Expensive operations such as cloning a large repo or checking out a large branch might result in timeout errors, but the operation might complete in the background. You can also try again later if the workspace was under heavy load at the time.

To work with a large repo, try sparse checkout.

404 errors

If you get a 404 error when you try to open a non-notebook file, try waiting a few minutes and then trying again. There is a delay of a few minutes between when the workspace is enabled and when the webapp picks up the configuration flag.

Detached head state

A Databricks Git folder can get into the detached head state if:

  • The remote branch is deleted. Databricks tried to recover the uncommitted local changes on the branch by applying those changes to the default branch. If the default branch has conflicting changes, Databricks applies the changes on a snapshot of the default branch (detached head).

  • A user or service principal checked out a remote repo on a tag using the `update repo` API.

To recover from this state:

  1. Click the create branch button to create a new branch based on the current commit, or use the “Select branch” dropdown to check out an existing branch.

  2. Commit and push if you want to keep the changes. To discard the changes, click on the kebab under Changes.

Resolve notebook name conflicts

Different notebooks with identical or similar filenames can cause an error when you create a repo or pull request, such as Cannot perform Git operation due to conflicting names or A folder cannot contain a notebook with the same name as a notebook, file, or folder (excluding file extensions).

A naming conflict can occur even with different file extensions. For example, these two files conflict:

  • notebook.ipynb

  • notebook.py

Diagram: Name conflict for notebook, file, or folder.

To fix the name conflict

  • Rename the notebook, file, or folder contributing to the error state.

    • If this error occurs when you clone the repo, you need to rename notebooks, files, or folders in the remote Git repo.

Errors suggest recloning

There was a problem with deleting folders. The repo could be in an inconsistent state and re-cloning is recommended.

This error indicates that a problem occurred while deleting folders from the repo. This could leave the repo in an inconsistent state, where folders that should have been deleted still exist. If this error occurs, Databricks recommends deleting and re-cloning the repo to reset its state.

No experiment...found or MLflow UI errors

You might see a Databricks error message No experiment for node found or an error in MLflow when you work on an MLflow notebook experiment last logged to before the 3.72 platform release. To resolve the error, log a new run in the notebook associated with that experiment.

Note

This applies only to notebook experiments. Creation of new experiments in Git folders is unsupported.

Notebooks appear as modified without any visible user edits

If every line of a notebook appears modified without any user edits, the modifications may be changes in line ending characters. Databricks uses linux-style LF line ending characters and this may differ from line endings in files committed from Windows systems.

If your notebook shows as a modified but you can’t see any obvious user edits, the “modifications” may be changes to the normally invisible “end of line” characters. End-of-line characters can be different across operating systems and file formats.

To diagnose this issue, check if you have a .gitattributes file. If you do:

  • It must not contain * text eol=crlf.

  • If you are not using Windows as your environment, remove the setting. Both your native development environment and Databricks use Linux end-of-line characters.

  • If you are using Windows, change the setting to * text=auto. Git will now internally store all files with Linux-style line endings, but will checkout to platform-specific (such as Windows) end-of-line characters automatically.

If you have already committed files with Windows end-of-line characters into Git, perform the following steps:

  1. Clear any outstanding changes.

  2. Update the .gitattributes file with the recommendation above. Commit the change.

  3. Run git add --renormalize. Commit and push all changes.