我正在尝试从我的本地存储库将文件推送到我的远程存储库,我看到了这个
致命错误:致命:无法访问' https://github.com/vinivasundharan/abcd.git/':无法解析主机' github.com'
我的计算机没有使用任何代理,因为我已经看到了在使用代理时解决问题的方法。
我尝试过this和this的解决方案。但两者似乎都没有帮助。我的系统使用Windows 7进行了有效的Internet连接。
更新
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Users/vav9sw/AppData/Local/Programs/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=xyz
user.email=xyz@gmail.com
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
remote.origin.url=https://github.com/vinivasundharan/abcd.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*`
返回以下内容。我不得不发布它,因为我不知道这意味着什么
Sub SearchFolders()
Dim fso As Object
Dim strSearch As String
Dim strFile As String
Dim wOut As Worksheet
Dim wbk As Workbook
Dim wks As Worksheet
Dim lRow As Long
Dim rFound As Range
Dim strFirstAddress As String
Dim oFolder, oSubfolder, oFile, queue As Collection
Dim HostFolder As String
Dim StartTime As Double
Dim SecondsElapsed As Double
StartTime = Timer
'********************
'GET FIRST COL VALUES
'********************
Dim i As Long
Dim j As Long
Dim searchItem As Variant
strSearch = ""
For i = 1 To Rows.Count
If Not IsEmpty(Cells(i, 1).Value) Then
strSearch = strSearch & "," & Cells(i, 1).Value
End If
Next i
'MsgBox (strSearch)
searchItem = Split(strSearch, ",")
HostFolder = "C:\Users\a\Desktop\xl files min\temp"
On Error GoTo ErrHandler
Application.ScreenUpdating = False
Set wOut = Worksheets.Add
lRow = 1
With wOut
.Cells(lRow, 1) = "Workbook"
.Cells(lRow, 2) = "Worksheet"
.Cells(lRow, 3) = "Cell"
.Cells(lRow, 4) = "Text in Cell"
'now some iterations through subfolders and folders
Set fso = CreateObject("Scripting.FileSystemObject")
Set queue = New Collection
queue.Add fso.GetFolder(HostFolder)
Do While queue.Count > 0
Set oFolder = queue(1)
queue.Remove 1 'dequeue
For Each oSubfolder In oFolder.SubFolders
queue.Add oSubfolder 'enqueue
Next oSubfolder
strFile = Dir(oFolder & "\*.xls*")
Do While strFile <> ""
Set wbk = Workbooks.Open _
(Filename:=oFolder & "\" & strFile, _
UpdateLinks:=0, _
ReadOnly:=True, _
AddToMRU:=False)
For Each wks In wbk.Worksheets
For j = 1 To UBound(searchItem) 'start iterating through the column's values
strSearch = searchItem(j) '***********A PROBLAM IN HERE?:
'******************************IF I PUT THE ARRAY LIKE SO AND MATCH, IT GOT STUCK, THOUGH,
'IF I PUT THE A VALUE THAT I KNOW THAT MATCH AS STRING FOR EXAMPLE
'I CAN DO: strSearch = "bla" THEN IT DOES WORKS... BUT I NEED THE DYNAMIC COL VALUES :\
'******************************************************
'MAYBE HERE THE PROBLAM? IF THERE IS A MATCH IT GOT STUCK
Set rFound = wks.UsedRange.Find(strSearch, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False) 'HERE
'MsgBox (strSearch)
If Not rFound Is Nothing Then
strFirstAddress = rFound.Address
End If
Do
If rFound Is Nothing Then
Exit Do
Else
lRow = lRow + 1
.Cells(lRow, 1) = oFolder & "\" & strFile
.Cells(lRow, 2) = wks.Name
.Cells(lRow, 3) = rFound.Address & temp
.Cells(lRow, 4) = rFound.Value
End If
Set rFound = wks.Cells.FindNext(After:=rFound)
Loop While strFirstAddress <> rFound.Address
'End If
Next j
Next
wbk.Close (False)
strFile = Dir
Loop
Loop
.Columns("A:D").EntireColumn.AutoFit
End With
SecondsElapsed = Round(Timer - StartTime, 2)
MsgBox ("This code ran successfully in " & SecondsElapsed & " seconds -- " & j)
ExitHandler:
Set wOut = Nothing
Set wks = Nothing
Set wbk = Nothing
Set oFolder = Nothing
Set oSubfolder = Nothing
Set oFile = Nothing
Set queue = Nothing
Set fso = Nothing
Application.ScreenUpdating = True
Exit Sub
ErrHandler:
MsgBox Err.Description, vbExclamation
Resume ExitHandler
End Sub
修改
只是为了确保我已按照上传文件到GitHub的步骤检查附加图像以查看我所遵循的步骤。
答案 0 :(得分:9)
这解决了我的问题:
http version:
git config --global --unset http.proxy
https version:
git config --global --unset https.proxy
答案 1 :(得分:4)
在Windows中,如果您安装了任何第三方防火墙(或互联网活动监视器),请将其配置为允许您的客户端访问外部连接。
如果没有任何第三部分防火墙,则转到控制面板,搜索防火墙。在防火墙面板中,选择添加新例外(或类似选项)。允许git客户端进行入站和出站访问。
答案 2 :(得分:0)
我建议你切换到ssh。
你可以从https一个地方获得github ssh链接。然后你只需要生成/添加你的ssh密钥到github配置文件。就是这样。
答案 3 :(得分:0)
在Windows 10上使用GitHub客户端时,我遇到了类似的问题。以管理员身份运行似乎可以解决此问题。