Azure DevOps Repo generate git credentials - expiration?

Nick C 5 Reputation points
2023-04-26T13:17:04.6+00:00

In Azure DevOps git Repo. If you click Clone, there is an option button to generate git credentials. I am wondering what the expiration duration is for the generated user/PAT (password)? This is what happened to me... I generated a git user/PAT and used it ok, but the next day I got an auth error. I then generated a new git user/PAT and immediately after used the new one ok.

Community Center Not monitored
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Abdul Sajid Mohammed 470 Reputation points Microsoft Employee
    2023-04-26T17:13:04.8133333+00:00

    Hello Nick,

    Thanks for posting your question here.

    Looks like possibly your Git credentials token in Azure DevOps and is set to token expiration as 24 hours by default by our administrator.

    As in below screenshot:

    1. Open your Azure DevOps organization or project.
    2. Click on "Personal access tokens" and select the token you want to modify.

    Click on "Edit" and modify the expiration duration as desired.

    Click on "Save" to save the changes.

    User's image

    Once you have updated the expiration duration as desired for the token, it should remain valid for the specified duration. If you continue to experience issues with the token expiring, you may want to check with your organization or project administrator to ensure that the token is configured correctly and has the necessary permissions to access the Git repository.

    Hope this helps, please let me know if you have any questions or concerns.

    Thankyou!

    1 person found this answer helpful.

  2. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2023-04-27T05:44:23.7866667+00:00

    @Nick C

    Thanks for reaching here!

    Onside note wanted to share that Currently, Azure DevOps is not supported on Microsoft Q&A. Please check this supported products list here (more to be added later on).

    The Azure DevOps team and community are active and answering questions on https://developercommunity.visualstudio.com/spaces/21/index.html

    Please post your question there and experts will guide you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.