Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expected to have my forked repository cloned, found an error "fatal: could not create work tree dir 'contribute-to-open-source': Permission denied" #2412

Closed
1 task done
pks7790 opened this issue Nov 25, 2019 · 2 comments
Labels

Comments

@pks7790
Copy link

pks7790 commented Nov 25, 2019

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

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

git version 2.24.0.windows.2
cpu: x86_64
built from commit: 02af2cc5bfc37d4500e8a09333269e57f442198a
sizeof-long: 4
sizeof-size_t: 8

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 10. 64-bit
$ cmd.exe /c ver

** Microsoft Windows [Version 10.0.18362.476] **
  • What options did you set as part of the installation? Or did you choose the
    defaults?
    I put Notepad++ as editor for Git
# 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

** $ "C:\Program Files\Git\etc\install-options.txt"
C:\Program Files\Git\etc\install-options.txt: line 1: Editor: command not found
C:\Program Files\Git\etc\install-options.txt: line 2: Custom: command not found
C:\Program Files\Git\etc\install-options.txt: line 3: Path: command not found
SSH: Could not resolve hostname Option:: Name or service not known
C:\Program Files\Git\etc\install-options.txt: line 5: Tortoise: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0curl: (6) Could not resolve host: Option
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0curl: (6) Could not resolve host: OpenSSL
C:\Program Files\Git\etc\install-options.txt: line 7: CRLF: command not found
Bash: Terminal: No such file or directory
C:\Program Files\Git\etc\install-options.txt: line 9: Performance: command not found
 **
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

** insert your response here **

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

** Bash **

** https://github.com/danthareja/contribute-to-open-source/blob/master/CONTRIBUTING.md#set-up-git-and-install-nodejs -link from which I was looking at in order to clone the forked repository
$ git clone https://github.com/pulkitsharma7790/contribute-to-open-source
fatal: could not create work tree dir 'contribute-to-open-source': Permission denied

 **
  • What did you expect to occur after running these commands?

** I just expected to have the forked repository cloned **

  • What actually happened instead?

** fatal: could not create work tree dir 'contribute-to-open-source': Permission denied**

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

**https://github.com/pulkitsharma7790/contribute-to-open-source **

@rimrul
Copy link
Member

rimrul commented Nov 25, 2019

Sorry to be this blunt, but what part of

could not create work tree dir 'contribute-to-open-source': Permission denied

is unclear? It tells you it couldn't create the 'contribute-to-open-source' directory, due to your local file system permissions.

@dscho
Copy link
Member

dscho commented Nov 25, 2019

$ cat /etc/install-options.txt

** $ "C:\Program Files\Git\etc\install-options.txt"
C:\Program Files\Git\etc\install-options.txt: line 1: Editor: command not found
C:\Program Files\Git\etc\install-options.txt: line 2: Custom: command not found
C:\Program Files\Git\etc\install-options.txt: line 3: Path: command not found
SSH: Could not resolve hostname Option:: Name or service not known
C:\Program Files\Git\etc\install-options.txt: line 5: Tortoise: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0curl: (6) Could not resolve host: Option
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0curl: (6) Could not resolve host: OpenSSL
C:\Program Files\Git\etc\install-options.txt: line 7: CRLF: command not found
Bash: Terminal: No such file or directory
C:\Program Files\Git\etc\install-options.txt: line 9: Performance: command not found
**

Whoops... The idea was to list the contents, not to try to execute that file as it were a script.

** https://github.com/danthareja/contribute-to-open-source/blob/master/CONTRIBUTING.md#set-up-git-and-install-nodejs -link from which I was looking at in order to clone the forked repository

Please take care of formatting your report correctly. This part was not supposed to be enclosed within the three backticks section

$ git clone https://github.com/pulkitsharma7790/contribute-to-open-source
fatal: could not create work tree dir 'contribute-to-open-source': Permission denied

What is your current working directory? If it is / in Git Bash, that corresponds to C:\Program Files\Git, and yes, you cannot write there.

Try cd (without any argument), which should get you into your home directory (~ in Git Bash), and try cloning again.

This is not a bug in Git for Windows, so I will close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants