Managing Git authentication for developers

In this topic, you will learn how to manage authentication when using Git on your system to access Control repositories within DevOps Loop deployment.

There are three types of credentials you can use with Control in a Loop deployment:

  • SSH keys: SSH keys provide secure, password-free access and are recommended for most developers. There are two methods to clone repositories using SSH keys:
  • Personal access token via HTTPS: For information, see the HTTPS (not with OAuth2 support) section in the Control documentation.
  • OAuth credentials with Git-Credential-Manager via HTTPS: To configure your Git client in the development environment for HTTPS communications with Control in a DevOps Loop deployment, add settings similar to the following example using the Git command line. Replace yourhost.example.com with your Loop server's hostname:
    git config --global credential.https://yourhost.example.com.provider generic
    git config --global credential.https://yourhost.example.com.oauthClientId git-credential-manager
    git config --global credential.https://yourhost.example.com.oauthTokenEndpoint /auth/realms/devops-
    automation/protocol/openid-connect/token
    git config --global credential.https://yourhost.example.com.oauthDeviceEndpoint /auth/realms/devops-
    automation/protocol/openid-connect/auth/device
    git config --global credential.https://yourhost.example.com.oauthAuthorizeEndpoint /auth/realms/devops-
    automation/protocol/openid-connect/auth
    git config --global credential.https://yourhost.example.com.oauthAuthModes DeviceCode

This configuration ensures secure and efficient access to your repositories.