aws-amplify / aws-amplify/amplify-hosting

Reconnect repository should insert Deploy Key to Github

Open
#1,837 13 comments 1 reaction 0 assignees View on GitHub
frontend-builds
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

![Screenshot from 2021-05-14 12-23-02](https://user-images.githubusercontent.com/721990/118268484-ba290080-b4bd-11eb-8f49-afb3dc36fa32.png)

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:

![Screenshot from 2021-05-14 12-32-11](https://user-images.githubusercontent.com/721990/118268525-c57c2c00-b4bd-11eb-8c2d-371513350fec.png)

That means when I try to build the AWS Amplify APP this will happen
![Screenshot from 2021-05-07 15-10-40](https://user-images.githubusercontent.com/721990/118268675-fa887e80-b4bd-11eb-9571-9067c99f576b.png)

### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.