public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* Bug report: latest (2.50.1) x64 version of Git for Windows
@ 2025-07-21 20:34 James Gao
  2025-07-22  0:01 ` brian m. carlson
  2025-07-22  9:47 ` Johannes Schindelin
  0 siblings, 2 replies; 4+ messages in thread
From: James Gao @ 2025-07-21 20:34 UTC (permalink / raw)
  To: git

Hi!

I just installed my system, and downloaded latest (2.50.1) x64 version
of Git for Windows and installed it.

I am on Windows 11 Pro, 10.0.22631.
Git CLI is not getting permission to the folders.
For example, I cannot run git init - error: couldn't set 'HEAD'
I cannot git pull or clone or git add

It returns me similar errors:
error: unable to write file
.git/objects/36/dd1796da4dcbb2f53005b64afeef698cfaf510: Permission
denied
error: src/helpers/schedule.ts: failed to insert into database
error: unable to index file 'src/helpers/schedule.ts'

I have tried every single help articles and blogs, nothing is working.

I tried running git bash as Administrator, still not working.

I am planning to download older versions, but it would be great to get
it fixed for lts.

Best
James

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug report: latest (2.50.1) x64 version of Git for Windows
  2025-07-21 20:34 Bug report: latest (2.50.1) x64 version of Git for Windows James Gao
@ 2025-07-22  0:01 ` brian m. carlson
  2025-07-22  9:47 ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: brian m. carlson @ 2025-07-22  0:01 UTC (permalink / raw)
  To: James Gao; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 2776 bytes --]

On 2025-07-21 at 20:34:35, James Gao wrote:
> Hi!
> 
> I just installed my system, and downloaded latest (2.50.1) x64 version
> of Git for Windows and installed it.
> 
> I am on Windows 11 Pro, 10.0.22631.
> Git CLI is not getting permission to the folders.
> For example, I cannot run git init - error: couldn't set 'HEAD'
> I cannot git pull or clone or git add
> 
> It returns me similar errors:
> error: unable to write file
> .git/objects/36/dd1796da4dcbb2f53005b64afeef698cfaf510: Permission
> denied
> error: src/helpers/schedule.ts: failed to insert into database
> error: unable to index file 'src/helpers/schedule.ts'
> 
> I have tried every single help articles and blogs, nothing is working.
> 
> I tried running git bash as Administrator, still not working.
> 
> I am planning to download older versions, but it would be great to get
> it fixed for lts.

I don't see this behaviour on my Linux system, so I suspect this is
something specific to your system or to Windows.  I would suggest trying
to report this on the Git for Windows issue tracker at
https://github.com/git-for-windows/git/issues.

A brief search shows that there are some issues there with this error
message.  For instance, if you're operating on a CIFS/SMB share (that
is, those with the `\\share\` syntax), there's a known issue about that.
It's also known that you should not put your Git repositories in a
folder that's special to Windows, such as Documents, because Windows
imposes additional restrictions on those paths in ways that can break
Git (this is also true of macOS).

Similarly, you absolutely should not place repositories in a directory
managed by OneDrive, Dropbox, or a similar syncing service, since they
often don't work and even when they do, these services can cause
corruption to repositories.  If it's not a regular folder on a regular
NTFS disk, you might try using a regular NTFS disk (such as C) to try to
see if it makes a difference.

If you do report it to the Git for Windows tracker, please search for
both open and closed issues and mention anything that is special about
your repositories and where you're storing them.  Is it a network drive
or folder?  What kind?  Is it a drive other than C?  What storage is it
on?  What file system is it using?  These kinds of answers will help the
maintainer determine the relevant difference about what's not working
and fix it.  I feel very confident that the Git for Windows maintainer
would not have released totally broken software, since they are
thoughtful and diligent, so there's some specific reason it's not
working for you while it is working for others.

Best of luck in solving your issue.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug report: latest (2.50.1) x64 version of Git for Windows
  2025-07-21 20:34 Bug report: latest (2.50.1) x64 version of Git for Windows James Gao
  2025-07-22  0:01 ` brian m. carlson
@ 2025-07-22  9:47 ` Johannes Schindelin
  2025-07-22 16:38   ` James Gao
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2025-07-22  9:47 UTC (permalink / raw)
  To: James Gao; +Cc: git

Hi James,

On Mon, 21 Jul 2025, James Gao wrote:

> I just installed my system, and downloaded latest (2.50.1) x64 version
> of Git for Windows and installed it.
> 
> I am on Windows 11 Pro, 10.0.22631.
> Git CLI is not getting permission to the folders.
> For example, I cannot run git init - error: couldn't set 'HEAD'

Is this the full error message?

> I cannot git pull or clone or git add
> 
> It returns me similar errors:
> error: unable to write file
> .git/objects/36/dd1796da4dcbb2f53005b64afeef698cfaf510: Permission
> denied
> error: src/helpers/schedule.ts: failed to insert into database
> error: unable to index file 'src/helpers/schedule.ts'

This suggests that you somehow have successfully created a clone... how?

> I tried running git bash as Administrator, still not working.

That is interesting, suggesting that the "Permission denied" error message
is misleading and that the error is not actually due to missing write
permissions.

Can you say more about your setup? Are you trying to clone onto a network
drive, for example?

> I am planning to download older versions, but it would be great to get
> it fixed for lts.

I don't know what you mean with "for lts", but yes, it would be great to
get it fixed.

By the way, before you download any older version, do make sure to try the
latest snapshot from https://gitforwindows.org/git-snapshots/.

Ciao,
Johannes

P.S.: I assume that https://github.com/git-for-windows/git/issues/5737 is
also you?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug report: latest (2.50.1) x64 version of Git for Windows
  2025-07-22  9:47 ` Johannes Schindelin
@ 2025-07-22 16:38   ` James Gao
  0 siblings, 0 replies; 4+ messages in thread
From: James Gao @ 2025-07-22 16:38 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Hi Johannes

Yes,  https://github.com/git-for-windows/git/issues/5737 is mine.
The clone is already-existing on my drive - background story is, I
reinstalled OS, and tried to set up my development env again.

Repo is in a normal hard drive (not cloud, not onedrive, just in my
local computer).

That is the all error message I got.

lts is actually LTS (Long Term Support). Term might be misleading, I
sometimes use LTS to be latest lol.

I am sorry I was not able to use git-snapshots, I downloaded
Git-2.24.1.2-64-bit and it worked OK.
I might be able to reinstall the newest one, and reproduce, but I am
quite afraid to do so, as my 20+ local git environment is at stake
haha.

Except that, I am happy to help you handle the issue.

Thanks!
James

On Tue, Jul 22, 2025 at 5:47 AM Johannes Schindelin
<Johannes.Schindelin@gmx•de> wrote:
>
> Hi James,
>
> On Mon, 21 Jul 2025, James Gao wrote:
>
> > I just installed my system, and downloaded latest (2.50.1) x64 version
> > of Git for Windows and installed it.
> >
> > I am on Windows 11 Pro, 10.0.22631.
> > Git CLI is not getting permission to the folders.
> > For example, I cannot run git init - error: couldn't set 'HEAD'
>
> Is this the full error message?
>
> > I cannot git pull or clone or git add
> >
> > It returns me similar errors:
> > error: unable to write file
> > .git/objects/36/dd1796da4dcbb2f53005b64afeef698cfaf510: Permission
> > denied
> > error: src/helpers/schedule.ts: failed to insert into database
> > error: unable to index file 'src/helpers/schedule.ts'
>
> This suggests that you somehow have successfully created a clone... how?
>
> > I tried running git bash as Administrator, still not working.
>
> That is interesting, suggesting that the "Permission denied" error message
> is misleading and that the error is not actually due to missing write
> permissions.
>
> Can you say more about your setup? Are you trying to clone onto a network
> drive, for example?
>
> > I am planning to download older versions, but it would be great to get
> > it fixed for lts.
>
> I don't know what you mean with "for lts", but yes, it would be great to
> get it fixed.
>
> By the way, before you download any older version, do make sure to try the
> latest snapshot from https://gitforwindows.org/git-snapshots/.
>
> Ciao,
> Johannes
>
> P.S.: I assume that https://github.com/git-for-windows/git/issues/5737 is
> also you?



-- 
James Gao - Big Dreamer, Fervent Developer, Forever Voyager

LinkedIn | GitHub | Gmail | Phone

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-22 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 20:34 Bug report: latest (2.50.1) x64 version of Git for Windows James Gao
2025-07-22  0:01 ` brian m. carlson
2025-07-22  9:47 ` Johannes Schindelin
2025-07-22 16:38   ` James Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox