code: func GetDefaultAuthConfig(cli Cli, checkCredStore bool, serverAddress string, isDefaultRegistry bool) (*types.AuthConfig, error) {
  	if !isDefaultRegistry {
  		serverAddress = registry.ConvertToHostname(serverAddress)
  	}
  	var authconfig configtypes.AuthConfig
  	var err error
  	if checkCredStore {
  		authconfig, err = cli.ConfigFile().GetAuthConfig(serverAddress)
  	} else {
  		authconfig = configtypes.AuthConfig{}
  	}
  	authconfig.ServerAddress = serverAddress
  	authconfig.IdentityToken = ""
  	res := types.AuthConfig(authconfig)
  	return &res, err
  }
docs: // GetDefaultAuthConfig gets the default auth config given a serverAddress
  // If credentials for given serverAddress exists in the credential store, the configuration will be populated with values in it