File '_netrc' / '.netrc' is not accepted by Git

后端 未结 2 1776
萌比男神i
萌比男神i 2021-01-12 11:40

I have set the %HOME% environment variable on my Windows installation.

In that folder I have put a file called _netrc. Inside that file I have:

machi         


        
2条回答
  •  一个人的身影
    2021-01-12 12:10

    I've been bashing my brains against this one too and I have a solution different from those posted.

    Ensure that your _netrc file is Ascii encoded. If using ECHO redirecting to a file on standard out, Windows uses the UCS-2 LE BOM file format. Some other apps might also have a different default from Ascii.

    So, if creating this file via script, use Set-Content -Encoding Ascii rather than a STOUT redirect. If creating this file via notepad++ or vim, ensure the encoding is set to ASCII.

提交回复
热议问题