Is codecommit cli and sdk command for get-file and get-folder deprecated?

0

I've been using cli and sdk calls to CodeCommit to manage my companies code repositories. I've been able to get around this issue for a while now by just using getDifferences and then using getBlob to retrieve each of those files.

But now, I want the files for a specific folder in my code repository. I was thinking of just doing a getFolder and then doing a getBlob for all the files that it returned using promises but it seems that I can't use the getFolder sdk command or the get-folder cli command. The aws documentation says that these commands are still available but all I get back is that the command is not recognized.

Am I missing something here?

已提问 6 年前494 查看次数
4 回答
0

Hi vwhitehurst

Sorry to hear you are having problems calling CodeCommit APIs via SDK and CLI.
Would you be able to give us more information about the error you are getting?

  • Which region are you using to make the calls?
  • What is the actual error message you are getting?
  • Which Operating System are you using?
  • Which command are you trying in the CLI?

It would also be helpful to know the version of your SDK and AWS CLI

Those information will help us investigate the problem.

Thanks

Edited by: robison-aws on Apr 3, 2019 11:15 AM

Edited by: robison-aws on Apr 3, 2019 11:16 AM

已回答 6 年前
0

OS: macOS Mojave 10.14.2

Region: us-east-1

Command:

aws codecommit get-folder --repository-name ${my_repo_name} --folder-path ${path_to_folder_in_repo} --profile ${aws_creds_for_account} --region us-east-1

Error:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:

batch-get-repositories                   | create-branch
create-pull-request                      | create-repository
delete-branch                            | delete-comment-content
delete-repository                        | describe-pull-request-events
get-blob                                 | get-branch
get-comment                              | get-comments-for-compared-commit
get-comments-for-pull-request            | get-commit
get-differences                          | get-merge-conflicts
get-pull-request                         | get-repository
get-repository-triggers                  | list-branches
list-pull-requests                       | list-repositories
merge-pull-request-by-fast-forward       | post-comment-for-compared-commit
post-comment-for-pull-request            | post-comment-reply
put-file                                 | put-repository-triggers
test-repository-triggers                 | update-comment
update-default-branch                    | update-pull-request-description
update-pull-request-status               | update-pull-request-title
update-repository-description            | update-repository-name
credential-helper                        | help

Where get-folder and get-file aren't listed which made me think they were deprecated or something.

已回答 6 年前
0

Hi, thanks for the response.

Can you confirm the version of the CLI you are using?

You should be able to execute those commands in CLI versions aws-cli/1.16.102 and newer.

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:

batch-get-repositories                   | create-branch
create-commit                            | create-pull-request
create-repository                        | delete-branch
delete-comment-content                   | delete-file
delete-repository                        | describe-pull-request-events
get-blob                                 | get-branch
get-comment                              | get-comments-for-compared-commit
get-comments-for-pull-request            | get-commit
get-differences                          | get-file
get-folder                               | get-merge-conflicts
get-pull-request                         | get-repository
get-repository-triggers                  | list-branches
list-pull-requests                       | list-repositories
merge-pull-request-by-fast-forward       | post-comment-for-compared-commit
post-comment-for-pull-request            | post-comment-reply
put-file                                 | put-repository-triggers
test-repository-triggers                 | update-comment
update-default-branch                    | update-pull-request-description
update-pull-request-status               | update-pull-request-title
update-repository-description            | update-repository-name
credential-helper                        | clone
help
  • Robison
已回答 5 年前
0

Ahhhh, that was it. I was running version 1.15.0. Now I see the commands. Thank you.

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则