none
Visual Studio 2017 Pro..... unable to commit to a GIT

    Question

  • I've installed Visual Studio 2017 and am working with my first C# program in this environment. When I try to commit the  source code to the local Git, I get the message:

    Git failed with a fatal error. error: open(".vs/OptionChain/v15/Browse.VC.opendb"): Permission denied
    fatal: Unable to process path .vs/OptionChain/v15/Browse.VC.opendb

    See attached screenshot.

    I'm not a Git expert.

    Any ideas?

    • Moved by CoolDadTx Monday, May 8, 2017 1:55 PM VS related
    Monday, April 24, 2017 3:59 AM

All replies

  • Hi Brian,

    The following thread looks like similar to your issue. Could you please look into that and see if it solves your issue.

    Visual Studio 2015 & Git error: open(“somefile.VC.opendb”): Permission denied fatal: Unable to process path myfile.VC.opendb


    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Thursday, April 27, 2017 1:51 PM
  • Hi Brain Muth,

    Thank you for posting here.

    For your question, what is the Git? If it is the Git of TFS, I will move it to Team Foundation Server - General forum for suitable support.

    We are waiting for your update.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 8, 2017 5:38 AM
  • Hi Brian,

    Welcome to the MSDN forum.

    What’s the project type that you created? I tried to search ‘Browse.VC.opendb’ and looks like relates to VS code, or the ‘*.opendb’ is the Visual C++ cache files, it is a little strange. Can you find it under your project? If so, please make sure your current account has the full control for this specific file.

    Refer to the error message, please have a try with the following steps to troubleshot:

    1. Close VS 2017 and restart it to open this solution, then commit it again.
    2. Adding the ‘*.VC.opendb’ and ‘*.opendb’ files to the .gitignore file of my project, then test it. Please have a look at the similar issue that Sabah Shariq shared.

    Best regards,

    Sara


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Tuesday, May 9, 2017 5:59 AM
    Moderator
  • Old thread, but anyway i post how i solved this in case anyone else have similar problems.

    Upon trying to commit changes I got a fatal git error/permission denied regarding the db.lock file. As i tried to "delete it" (in fact i just tried to move it somewhere else) i noticed it was being used by ServiceHub.Host.CLR.x86.

    I couldnt kill the service in task manager, and I could probably just have restarted, but i just used pskill (a nifty tool by Mark Russinovich) and killed it and 6 descendant processes. Then, i could commit successfully.

    Cheers,

    Ove

    • Proposed as answer by Brunsniggel Tuesday, October 24, 2017 3:33 PM
    Tuesday, October 24, 2017 3:33 PM
  • Thank you so much! Effectively, it is a .gitignore contents issue. :)



    Some of lines below are missing in the newly generated .gitignore  

    extract from the good one:
    # ...
    # Visual C++ cache files
    ipch/
    *.aps
    *.ncb
    *.opendb
    *.opensdf
    *.sdf
    *.cachefile
    *.VC.db
    *.VC.VC.opendb

    # Visual Studio profiler
    *.psess
    *.vsp
    *.vspx
    *.sap

    #...

    Monday, October 30, 2017 2:26 PM
  • Although adding the .vs folder to .gitignore will allow commits it doesn’t help when you need to ‘clean’ the repository:(

    Anthony Conrad

    Monday, June 4, 2018 3:02 AM