Knowledge Drop

Error - "Project already Exists" for bare repo

  • 30 April 2021
  • 0 replies
  • 542 views

Userlevel 5

Last tested: Jul 23, 2020
 

Chat Tip: Bare repos are not recommended. Use Github or another remote repository if possible.

One challenge with bare repos is that deleting the project or moving to a remote repo does not delete the bare repo folder. So, if you try to use a bare repo with the same name, you'll get an error saying the repo already exists. There is no way to delete the bare repo fully from the UI, but that is a good point to add to this product feedback.

If you find yourself in that unfortunate situation, and you host your own instance, follow these steps. If your Looker deployment is hosted by Looker, please open a Looker support request for assistance.
 

  1. Log in to the server hosting your instance.
  2. Rename ~/models/project_name to something else, like ~/models/project_name_backup.
  3. Rename ~/bare_models/project_name.git to something else, like ~/bare_models/project_name_backup.git
  4. If there once existed a remote repo with the same name, delete the remote key for that repo, found at ~/deploy_keys/project_name/id_rsa.pub

Then you should be able to create the project again through the UI. Since you made a copy of the folders, you can put the files back in if you want.

Tip: If other developers are still pointing to the remote repo (you'll know because "Test Git connection" will fail for them, and there will still be a "Remote Origin URL" at the very bottom of their "Project Settings" page), then you should delete the ~/models-user-X/project_name/.git/config file, where X is their user ID.

 

 

This content is subject to limited support.                

 

 


0 replies

Be the first to reply!

Reply