codemagic-ci-cd / codemagic-docs

Here you’ll find some essential information for setting up CI/CD for your mobile apps with Codemagic.
https://docs.codemagic.io
MIT License
83 stars 121 forks source link

Allow me to change repository URL #2517

Closed bean5 closed 5 months ago

bean5 commented 5 months ago

Discussed in https://github.com/orgs/codemagic-ci-cd/discussions/2516

Originally posted by **bean5** May 7, 2024 ### Use case ```Text In Github, my project was renamed for purposes of consistency. It turns out that it broke the connection with Codemagic. I do not want to delete my applications since that would lose all my workflow configurations. While it is possible to rename the project, it is not currently possible to update the repository path! There is a button for "Update repository URL", but the field next to it is locked and even if you "hack" the field value, clicking the button will fail to update the path. Until I fix this, I will continue to get the below errors. When attempting to update the repository URL: Cannot access repositories Bad credentials When attempting to run a build: Cannot access repository https://api.github.com/repos/bean5/old-repo-name Bad credentials ``` ### Idea ```Text Allow user to update the URL of the repository or relink somehow. ```
bean5 commented 5 months ago

Affected projects

https://codemagic.io/app/5e41f6e035303b4ac981b9ac/workflow/5e41f6e035303b4ac981b9ab/settings https://codemagic.io/app/5e5e924bbce8e100132924a1/workflow/5e5e924bbce8e100132924a0/settings https://codemagic.io/app/609906e73e99f9000c7cbba6/workflow/609906e73e99f9000c7cbba5/settings

martinjeret commented 5 months ago

Hi there,

I'm sorry you're having issues. Can you please share a buildID of one of the failed builds for example so I can lookup your team and start investigating the issue. I'm unable to locate you based on app URL unfortunately.

best,

bean5 commented 5 months ago

@martinjeret Been a while since I used the app. I actually have no builds. I think build history was so old they got deleted.

Sorry I took such a break from using this.

bean5 commented 5 months ago

I cannot add an app. I even gave the GitHub hook installation full auth and made a new project public. I'm not sure what is going on.

martinjeret commented 5 months ago

if you go to teams tab and navigate to the team that is affected you should have a URL with your teamID can you share that?

bean5 commented 5 months ago

@martinjeret https://codemagic.io/teams/5db8734f5dbbb2371b4409ce

martinjeret commented 5 months ago

it's not allowing you to change repo URL because you haven't finished configuring your github app integration if you go to team tab and and navigate to your personal account and then you'll see that your github integration is not configured and there is a finish installation button you should click

https://docs.codemagic.io/getting-started/adding-apps/ here is the guide how to configure github app. Please try to do that and let me know if it helps

bean5 commented 5 months ago

I have tried installing the GH integration many times. I revoked it many times. I gave it full access at one point. I disabled adblockers as well.

I am still stuck.

martinjeret commented 5 months ago

I'm working on reproducing your issue

martinjeret commented 5 months ago

I was unable to reproduce it unfortunately. Based on what you've described can you try to do this:

go to teams> personal account > integrations > GitHub > finish installation > disconnect in GitHub delete the app

start over. If you record it or take screenshots throughout, I can perhaps spot something. It is unfortunately difficult to debug since I don't have access to your GitHub.

bean5 commented 5 months ago

Okay. Looks like I was stuck in a connection/setup mode. Using your route I disconnected and in GitHub I revoked and uninstalled (those are 2 operations). After that, installing it allowed me to connect the apps AND update the paths.

Thanks @martinjeret