4

I am new to Git and Github; and I came across a problem. There is a similiar question here (git bash failed to load advapi32.dll), but they are experiencing a different problem and there are no answers either. I have searched online and was unable to fix this. Here is the issue:

I am using Git Bash to push/pull commits to Github. When I try to push my work, I get this error saying "failed to load advapi32.dll ". I do have this file in my registry. The full Git message is bellow. It is worth noting here, that despite this error, Git is uploading and downloading commits perfectly fine; I just want to fix this problem in case it causes more issues in the future.

$ git push origin master
failed to load advapi32.dll
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 418 bytes | 418.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/khash021/reflections.git
   98a7bd9..b982ba4  master -> master

Thanks, Khash

Khash
  • 151
  • 1
  • 12

3 Answers3

5

This problem occurs because the credential halper has been set to wincred and you do not have wincred installed. To verify this, run the command

git config --global credential.helper

if the result says "wincred", this is your problem. To unset the credential helper, run the command:

git config --global --unset credential.helper

That should solve the problem.

Michael
  • 401
  • 5
  • 16
0

First, check your Git version: if it was v2.16.1.windows.2, from 4 days ago, it was quite buggy.

Try with the one released today: v2.16.1.windows.3: uncompress PortableGit-2.16.1.3-64-bit.7z.exe anywhere you want, and define a simplified PATH for testing.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the reply. I did have the version you mentioned installed. I got the newer version and installed it. Then ran the new Git (confirmed the version) and still got the same error. However, I did not modify my path since the path in the "simplified PATH" seemed very different than my current path; and since I also did not fully understand those 3 lines in cmd, and didn't want cause major issues to my OS, I did not implement those. Can you maybe elaborate a bit on setting the path, and how it could be revered in case I did something wrong. Thanks – Khash Feb 07 '18 at 01:22
  • @Khash All you need to do is uncompressed a portable version of Git for Windows anywhere you want and copy those lines (https://stackoverflow.com/a/45779657/6309) in a CMD: that will affect only that CMD session. Once you close that CMD, your user/system environment variables previously in place won't have changed. – VonC Feb 07 '18 at 07:51
  • @Khash Also check if using a 2.15 version instead of a 2.16.x helps. – VonC Feb 07 '18 at 07:51
  • I have checked the version of the new Git and it is indeed 2.16.1.windows.3. I have copied those line into my cmd, pushed the files into server, and still got the same error. The error does not seem to case any issues though. – Khash Feb 07 '18 at 22:49
  • @Khash To be fair, 2.16.3 is so a few hours ago: try the 2.16.4 ;) (or, to check, the 2.15.x) – VonC Feb 07 '18 at 22:50
-1

well you could adding the flag:

$ git push origin master --all

Also, given that the .dll file is a system file, check that git has the permission to access it.

Margach Chris
  • 1,404
  • 12
  • 20