class_docstr: Base class for different types of credentials
  
  Note: While subclasses can define their own `_FIELDS`, they are actually
  assumed to have particular keys by the implementation of (some)
  authenticators. `HTTPRequestsAuthenticator` and its subclasses for example,
  assume `user` and `password` to be valid keys.
class_docstr_tok: ["Base","class","for","different","types","of","credentials","Note",":","While","subclasses","can","define","their","own","`","_FIELDS","`",",","they","are","actually","assumed","to","have","particular","keys","by","the","implementation","of","(","some",")","authenticators",".","`","HTTPRequestsAuthenticator","`","and","its","subclasses","for","example",",","assume","`","user","`","and","`","password","`","to","be","valid","keys","."]
docstr: Enter new values for the credential fields
  
  Parameters
  ----------
  instructions : str, optional
    If given, the auto-generated instructions based on a login-URL are
    replaced by the given string
  **kwargs
    Any given key value pairs with non-None values are used to set the
    field `key` to the given value, without asking for user input
code: def enter_new(self, instructions=None, **kwargs):
      """Enter new values for the credential fields
  
      Parameters
      ----------
      instructions : str, optional
        If given, the auto-generated instructions based on a login-URL are
        replaced by the given string
      **kwargs
        Any given key value pairs with non-None values are used to set the
        field `key` to the given value, without asking for user input
      """
      if kwargs:
          unknown_fields = set(kwargs).difference(self._FIELDS)
          known_fields = set(self._FIELDS).difference(kwargs)
          if unknown_fields:
              raise ValueError(
                  "Unknown to %s field(s): %s.  Known but not specified: %s"
                  % (
                      self,
                      ", ".join(sorted(unknown_fields)),
                      ", ".join(sorted(known_fields)),
                  )
              )
      # Use ui., request credential fields corresponding to the type
      for f in self._FIELDS:
          if kwargs.get(f, None):
              # use given value, don't ask
              self.set(**{f: kwargs[f]})
          elif not self._is_field_optional(f):
              self._ask_and_set(f, instructions=instructions)
  
imports: import time
  from ..support.exceptions import AccessDeniedError, CapturedException
  from ..support.keyring_ import keyring
  from ..ui import ui
  from ..utils import auto_repr
  from ..support.network import iso8601_to_epoch
  from datalad import cfg
  from datalad.config import anything2bool
  from datalad.distribution.dataset import Dataset
  from datalad.local.gitcredential import GitCredentialInterface
  from logging import getLogger
label_desc: Use image node_id 8 for calling the Credential obj's underlying member method code with example usage: obj.enter_new(instructions) without return types