Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove the existing aws credentials and point codecommit to the new aws sso account #24

Open
nishitjain13 opened this issue Nov 27, 2020 · 1 comment

Comments

@nishitjain13
Copy link

I have been working on a project where I have used codecommit as my repository. My Linux system is configured with the credentials of my personal aws account(for which I had the private and the security key). I now need to push the code into my company's aws account (in which I am a federated user with sso credentials).

I have removed my old remote (which was in my personal aws account), and am trying to use git-remote-codecommit to add the new repo (Textanalysis) with the following command:

git add remote cc codecommit::us-east-2://Textanalysis

However, my CLI seems to still be pointing to my personal aws, and not to the corporate one. And it is not able to find this repo.

How do we get the CLI to point to the new aws account?

@DmitryNefedov
Copy link

DmitryNefedov commented Dec 1, 2020

You should include your profile name from ~./aws/credentials to the remote URL.
If you have [cool-company] as your cli profile for the company, then use codecommit::us-east-2://cool-company@Textanalysis as your remote url.
Without specifying the profile - it tries to use your default, which, I assume, points to your personal account and doesn't have a repo called Textanalysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants