How can we help you today? How can we help you today?

How to fix git error when refreshing changes

I linked a database to source control which seemed to work without error. However, when I attempt to refresh the list of changes, I receive a git error.

Failed to execute git command 'clean -f -d' warning: failed to remove ./: Permission denied<br>

dsbert
0

Comments

13 comments

  • AlexYates
    Do you by any chance have any of the files open/selected/locked in any other programs? (E.g. file explorer/text editor).

    Do you have full access to the filesystem where your git repo is located?
    AlexYates
    0
  • dsbert
    Yes I have full access. I'm linking the database to an empty subdirectory. I already have another database linked to the same repository in a different directory and that one works fine.
    dsbert
    0
  • AlexYates
    Have you tried deleting the local repo and pulling down a fresh clone?

    (Obviously commit and push or otherwise save any local updates/commits before deleting the local repo to avoid losing work.)
    AlexYates
    0
  • dsbert
    I cloned the repo again to a different directory, unlinked the db and linked it again with the new path. Now it works - but the entire DB is showing up as a change. I'm guessing something went wrong when I first linked it?

    Just noticed when i tried to delete the original repo, I'm getting an error. Looks like something is holding a file lock. Maybe that was the issue.
    dsbert
    0
  • AlexYates
    Is there a redgate.ssc file at the exact path you committed to?

    Does the code in the repo match the code in the DB?
    AlexYates
    0
  • dsbert
    Yes there is a redgate.ssc file. It is the same one from when I first linked this database and I have not made any changes to it because of the issues discussed in this thread.
    dsbert
    0
  • AlexYates
    So the entire DB is showing as a change... What sort of change? New objects? Modified objects? Deleted objects?

    I'm assuming you were expecting them to be in sync?
    AlexYates
    0
  • dsbert
    I tried renaming my new cloned folder and then relinking the same database again to the new path. I received the same error about not being able to execute git clean.

    Does SQL Source Control support multiple databases in the same git repository?
    dsbert
    0
  • AlexYates
    It should do. Most of my clients use Git repos that contain multiple DBs.

    Have you tried opening a command prompt to the DB directory and running a git status and a git clean?

    Does that give you any more feedback or provide any unexpected surprises?
    AlexYates
    0
  • dsbert
    I can run git clean without any issues from both the directory that I linked to and the root of the repository.
    dsbert
    0
  • AlexYates
    After running git clean, did your issues persist? (I'm assuming so).

    At this point I think I'm out of suggestions. I suspect it's one for Redgate tech support. Good luck!
    AlexYates
    0
  • tinterqh
    Sorry to bring up an old thread, but I see nothing newer.  Was there any resolution to this?  I am experiencing this same exact issue.
    tinterqh
    0
  • dsbert
    I do not recall what finally resolved this issue for me but at some point it stopped being a problem. Sorry I can't offer more info.
    dsbert
    0

Add comment

Please sign in to leave a comment.