Updating git token fails

PSY
New Contributor III

When updating an expired Azure DevOps personal access token (PAT) for git integration, I get the error message "Failed to save. Please try again.".

The error persists with different tokens. Previously (months ago), updating the token did not result in an error message.

Screenshot 2022-07-19 at 13.39.56How could the token be updated successfully?

AmanSehgal
Honored Contributor III

Another way to update token is to use Git Credential API2.0

Check the documentation for endpoint update the credential.

PSY
New Contributor III

Thanks a lot for the tip! Unfortunately, I also get an error using the API (PATCH /git-credentials/{credential_id}).

ERROR 500

{

"error_code": "INTERNAL_ERROR",

"message": "There was an error performing the operation. Please try again or open a support ticket."

}

PSY
New Contributor III

Thanks @Aman Sehgal​! Updating the token through the API did not work, but I fixed the problem by deleting the repo:

  1. DELETE /repos/{repo_id}
  2. POST /repos

View solution in original post

Atanu
Databricks Employee
Databricks Employee

Is this happening for all users @Pencho Yordanov​ 

PSY
New Contributor III

It seems to be happening only to me. I have checked with three other users who do not experience the problem.