Jump to content

Export Plastic Cloud to Git - Works in UI but fails when running from CLI - Error: The credentials introduced for the repository are not valid


estevao_ag

Recommended Posts

When I run command from cmd: 

cm sync <REPO>@<ORGNAME>@cloud git https://<USER>:<PASS>@dev.azure.com/<FULL REPO URL>

I get the following error:

Error: The credentials introduced for the repository are not valid

*FULL REPO URL has spaces and azure updates it to use %20 (I tested replacing %20 with <space> and <"> before and after, but didn't work too)

 

Log with cm.log.conf:

2022-08-09 14:20:08,748 ERROR 4 sync - Error running sync: The credentials introduced for the repository are not valid. StackTrace:

2022-08-09 14:20:08,777 ERROR 1 sync - Sync error: The credentials introduced for the repository are not valid

2022-08-09 14:20:08,780 ERROR 1 cm - Plastic client version: 11.0.16.7274

2022-08-09 14:20:08,781 ERROR 1 cm - The credentials introduced for the repository are not valid
2022-08-09 14:20:08,783 DEBUG 1 cm - The credentials introduced for the repository are not valid   at Codice.Client.BaseCommands.SyncCmd.Synchronize(SyncSettings settings)
   at Codice.Client.BaseCommands.SyncCmd.Execute(CommandLineArguments cla)
   at Codice.Client.cm.MainClass.Main(String[] args)

 

Link to comment
Share on other sites

Ohhh. One thing I noticed is that when using the UI, I do need to click a branch on the branch explorer, to be able to have the option to do the sync.

So maybe I needed to update my repspec to have a branch information, right?

Looking on cm help objectspec doc:

-- Branch spec (brspec) --
    br:[/]br_name[@repspec]

    Examples:
        cm switch br:/main@rep:plastic@repserver:skull:9095
        (In this case "br:", "rep" and "repserver" are not needed, so the
         command admits a much shorter form:
        "cm switch main@plastic@skull:9095".)

-- Branch spec (brspec) --
    br:[/]br_name[@repspec]

    Examples:
        cm switch br:/main@rep:plastic@repserver:skull:9095
        (In this case "br:", "rep" and "repserver" are not needed, so the
         command admits a much shorter form:
        "cm switch main@plastic@skull:9095".)

I would guess all I need to do is: <BRANCH>@<REPO>@<ORGNAME>@cloud

But then I receive the following error:

The specified repository couldn't be found: br:main@Test02.

main is the BRANCH and Test02 is the REPO

 

If I remove the branch, I get back to the original error: 

Error: The credentials introduced for the repository are not valid

 

Hopefully this helps a little bit more on understanding what may be missing

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...