I want to access to a .diff file of a private repository of GitHub. I have the following code, but doesn't work.
Dim myReq As HttpWebRequest = WebRequest.Create(url)
Dim netCred As NetworkCredential = New NetworkCredential("usr", "pass")
Dim credentials As ICredentials = netCred.GetCredential(url, "Basic")
myReq.Credentials = credentials
myReq.PreAuthenticate = True
Try
Dim response As HttpWebResponse = CType(myReq.GetResponse(), HttpWebResponse)
Catch ex As System.Net.WebException
MessageBox.Show(ex.Message)
End Try
There is something wrong? The message that the WebException contains is "Error in the remote server. (404) Not Found"