1

I had no issues since two weeks but i am getting this error now

murta@DESKTOP-Q8IFK52 MINGW64 ~/Code_Dump/homunculi (haji13)
$ git pull origin develop
fatal: FileNotFoundException encountered.
Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its 
dependencies. The system cannot find the file specified.
remote: Counting objects: 69, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 69 (delta 35), reused 32 (delta 10)
error: unable to create temporary file: Invalid argument
fatal: failed to write object
fatal: unpack-objects failed

i also checked out my branches all exist

murta@DESKTOP-Q8IFK52 MINGW64 ~/Code_Dump/homunculi (master)
$ git branch
develop
haji10
haji11
haji12
haji13
haji5
haji6
haji7
haji8
haji9
* master

tried this as well

 git push --set-upstream origin haji13
 fatal: FileNotFoundException encountered.
 Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, 
 Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its 
 dependencies. The system cannot find the file specified.
 Total 0 (delta 0), reused 0 (delta 0)
 remote:
 remote: Create pull request for haji13:
 remote:   https://bitbucket.org/murtazahaji/homunculi/pull-requests/new?
 source=haji13&t=1
 remote:
 To https://bitbucket.org/murtazahaji/homunculi.git
 * [new branch]      haji13 -> haji13
 Branch haji13 set up to track remote branch haji13 from origin

if anyone could help me it would be great

Murtaza Haji
  • 664
  • 1
  • 7
  • 26

1 Answers1

2

To avoid any interference with another software, use for your Git push a CMD shell where you set a simplified PATH:

set G=c:\path\to\latest\git
set PATH=%G%\bin;%G%\usr\bin;%G%\mingw64\bin
set PATH=%PATH%;C:\windows\system32;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\

If GH (the Git installation folder) is set before Windows\System32, the find from Git will be chosen over the default Windows one.

Then type 'bash', to get a shell session within your (tailored) CMD shell.
And try again your git push.

The OP Murtaza Haji mentions in the comments:

Anyway, the issue was resolved after I restarted my PC.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • i was using git shell to make commits. Any way issue was resolved after i restarted my pc. Not sure what might have caused the error. Thanks anyways @VonC – Murtaza Haji Mar 22 '18 at 18:02
  • 1
    @MurtazaHaji Great! i have included your comment in the answer for more visibility. – VonC Mar 22 '18 at 21:50