Monday, July 2, 2018

TFS Git not tracking remote branch in Visual Studio


Track remote branch
Original problem: Pull disabled in Visual Studio
 git branch -u origin/branchname

Thursday, May 17, 2018

Fix Nuget package errors with Visual Studio 2017 Enterprise

If you face problems accessing/installing the nuget packages from Visual Studio 2017 Enterprise edition, please follow the below steps:

  1. Copy the .nuget folder into the solution folder. It should have 3 files: Nuget.Config, Nuget.exe and Nuget.Targets
  2. Edit Nuget.Config as below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution> 
  <packageSources> 
       <add key="http_proxy" value="company proxy address" />
       <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> 
       <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> 
       <add key="Local" value="local folder\Nuget Packages\" /> 
  </packageSources>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
</configuration>
  1. Close and Exit Visual Studio.

Other way to add proxy entry is to run the following command:
nuget.exe config -set http_proxy=http://my.proxy.address:port
In case you are wondering how to get proxy:

  1. Open chrome, go to below URL to see the proxy details: chrome://net-internals/#proxy
  2. Check Proxy tab on left. Run the PAC script in browser URL
  3. It should download one pac file . Open in notepad. Check for something like this:
if ( host == "abc.com" )
      { return "PROXY IP Address:Port"; }

Thats your proxy.

If this doesn't work, try below:
<system.net>
    <defaultProxy useDefaultCredentials="true" enabled="true">
        <proxy proxyaddress="http://your.proxyserver.ip:port"/>
    </defaultProxy>
    <settings>
        <ipv6 enabled="true"/>
        <servicePointManager expect100Continue="false" />
    </settings>
</system.net>

Wednesday, April 18, 2018

Monday, April 9, 2018

Unable to load the service index for source https://api.nuget.org/v3/index.json

Fix: Run command "dotnet restore"  from Visual Studio version Command Prompt


Tuesday, July 11, 2017

Clone existing Git repo to TFS git

Clone existing git repo ( Visual Studio 2015/2017 or github)
Copy remote URL and edit the remote origin to the cloned url
Using command prompt(Browse to the actual directory in Git Bash)
  • git remote rm origin
  • git push -u origin --all

In case we get "SL certificate problem: Unable to get local issuer certificate" error, execute below statement:
https://confluence.atlassian.com/bitbucketserverkb/ssl-certificate-problem-unable-to-get-local-issuer-certificate-816521128.html

git config --global http.sslVerify false

Friday, July 7, 2017

All you wanted to know about TFS integration tools/platform

This link pulls together all the blog posts that relate to the TFS Integration Tools / Platform.


Thursday, April 13, 2017

GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error

Problem is with proxy that mostly organizations use

Solution:

Open chrome, go to below URL to see the proxy details:

chrome://net-internals/#proxy


Check Proxy tab on left. Run the PAC script in browser URL

It should download one pac file . Open in notepad

Check for something like this:

if ( host == "abc.com" )
      { return "PROXY IP Address:Port"; }


Thats your proxy.


Open .gitconfig file and append as seen below

[http]
    proxy = http://Domain\\UserID:Password@ProxyIPAddress:ProxyPort

If your password has @ replace with %40, if # then %23

It should work now