What are the challenges you face when working across database platforms? Take the survey
Options

Can't commit to local repository, owned by someone else

Enterprise security policy change requiring login through SSMS that is different than the login that was originally used when setting up SQL Source Control.  Getting error "fatal: unsafe repository <repository> is owned by someone else"  Instructions suggest "To add an exception for dis directory call git config ...."
Where / how would I do this?
Executed the "git" command from a command shell while located at the root of the <repository> 
Received no error, but did not fix the issue when I attempted to refresh from SSMS

thanks
Tagged:

Answers

  • Options

    HI Craig,

     

    Thank you for your inquiry into SQL Source Control.

     

    The article below may help with the git error you are seeing:

    https://github.com/actions/checkout/issues/766

     

    Workaround: Other steps are failing

    Since we don't persist that configuration, you may still see this error if your job uses git commands outside of the checkout action. If so, you just need to set the configuration value yourself.

    Simply set the GITHUB_WORKSPACE as a safe directory.

    git config --global --add safe.directory "$GITHUB_WORKSPACE"
    

    If your github workspace starts off with //, you may need to set it via

    git config --global --add safe.directory "%(prefix)/$GITHUB_WORKSPACE"

     

    A little more detail about setting a safe repository is located here:

    https://git-scm.com/docs/git-config/#Documentation/git-config.txt-safedirectory

     

    I hope this helps.

     

    Best,

     

    Dustin 

     

Sign In or Register to comment.