aws-amplify / aws-amplify/amplify-hosting
Reconnect repository should insert Deploy Key to Github
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-console/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### App Id
arn:aws:amplify:eu-west-2:694647969796:apps/dg1s64s7fmyba
### Region
eu-west-2
### Amplify Console feature
Build settings
### Describe the bug
Given I use Github with AWS Amplify
When I select repository
Then "Deployment Key" is inserted to this repository on Github
:+1: so far so good

Given I remove this "Deployment Key" from Github repository (e.g. due to https://github.com/aws-amplify/amplify-console/issues/1830)
When I Reconnect Repsitory (in AWS Amplify > General settings)
Then deployment key is not reinserted :-1:

That means when I try to build the AWS Amplify APP this will happen

### Expected behavior
Given I remove "Deployment Key" from Github repository
When I Reconnect Repsitory (in AWS Amplify > General settings)
Then deployment key should be reinserted
### Reproduction steps
1. configure AWS Amplify to use Github Repo
2. go to Github repository settings > Deployment Keys > remove the key inserted by AWS Amplify
3. go to AWS Amplify > general settings > reconnect repsitory
4. check Github repository settings > Deployment Keys == see no new deployment key
### Build Settings
_No response_
### Additional information
this is related to bug https://github.com/aws-amplify/amplify-console/issues/1830#
and https://github.com/aws-amplify/amplify-console/issues/157#issuecomment-834362708 and https://github.com/aws-amplify/amplify-console/issues/1815
Contributor guide
Research direction
Reproduce the issue through AWS Amplify General settings by removing the repository's deployment key and reconnecting it, then inspect the reconnect repository flow and its GitHub deployment-key handling. Done means reconnecting restores the missing deployment key and a subsequent build can access the repository; verify the behavior using the listed reproduction steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, github
- Domain
- ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100