Skip to content

Cannot init a git repository because I do not have access to one folder in the specified path: fatal: unable to get current working directory: No such file or directory #1944

@rvignolo

Description

@rvignolo

I was not able to init a git repository in the following path /c/I/cannot/access/to/this/path/but/I/can/access/to/this/one because I do not have permissions for the path /c/cannot/access/to/this/path/. I believe git fails when trying to set up the working directory with pwd or something like that. If I run pwd I do not get any error.

Thanks!

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
    git version 2.16.2.windows.1
    64-bit
$ git --version --build-options

git version 2.16.2.windows.1
cpu: x86_64
built from commit: e1848984d1004040ec5199e749b5f282ddf4bb09
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Path Option: BashOnly
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Disabled
Enable Symlinks: Disabled

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Bash
git init
  • What did you expect to occur after running these commands?

I expected to init a git repository.

  • What actually happened instead?
fatal: unable to get current working directory: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions