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

Unable to push new code to GitLab project #57

Closed
jwflory opened this issue Nov 9, 2023 · 3 comments · Fixed by #61
Closed

Unable to push new code to GitLab project #57

jwflory opened this issue Nov 9, 2023 · 3 comments · Fixed by #61
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jwflory
Copy link
Member

jwflory commented Nov 9, 2023

I ran the exporter tool but was unable to get it to run successfully. My GitLab token scopes are api and write_repository. See log below.

$ pagure-exporter -s fedora-diversity -d 52037323 -p $PAGURE_KEY -g $GITLAB_KEY -f jflory7 -t jwflory repo
[2023-11-09 11:28:23 -0500] [ BUSY ] Requesting for source namespace metadata...
[2023-11-09 11:28:23 -0500] [ PASS ] Source namespace metadata acquisition succeeded!
[2023-11-09 11:28:23 -0500]          Name: fedora-diversity
[2023-11-09 11:28:23 -0500]          Identifier: 943
[2023-11-09 11:28:23 -0500]          Maintainer: Justin W. Flory (ID jflory7)
[2023-11-09 11:28:23 -0500]          Location: https://pagure.io/fedora-diversity
[2023-11-09 11:28:23 -0500]          Address: https://jflory7:$PAGURE_KEY@pagure.io/fedora-diversity.git
[2023-11-09 11:28:23 -0500]          Created on: Mon Aug  8 18:41:35 2016
[2023-11-09 11:28:23 -0500]          Last modified on: Wed Sep  6 06:00:04 2023
[2023-11-09 11:28:23 -0500]          Tags: ['diversity', 'subproject', 'inclusion', 'equity', 'dei']
[2023-11-09 11:28:25 -0500] [ BUSY ] Requesting for destination namespace metadata...
[2023-11-09 11:28:25 -0500] [ PASS ] Destination namespace metadata acquisition succeeded!
[2023-11-09 11:28:25 -0500]          Name: fedora/dei/pagure
[2023-11-09 11:28:25 -0500]          Identifier: 52037323
[2023-11-09 11:28:25 -0500]          Maintainer: dei (ID Diversity Equity and Inclusion Team)
[2023-11-09 11:28:25 -0500]          Location: https://gitlab.com/fedora/dei/pagure
[2023-11-09 11:28:25 -0500]          Address: https://jwflory:$GITLAB_KEY@gitlab.com/fedora/dei/pagure.git
[2023-11-09 11:28:25 -0500]          Created on: 2023-11-09T16:18:52.130Z
[2023-11-09 11:28:25 -0500]          Last modified on: 2023-11-09T16:18:52.130Z
[2023-11-09 11:28:25 -0500]          Tags: []
[2023-11-09 11:28:25 -0500] [ BUSY ] Starting migration...
[2023-11-09 11:28:25 -0500] [ BUSY ] Attempting source namespace assets clone...
[2023-11-09 11:28:26 -0500] [ PASS ] Source namespace assets clone succeeded!
[2023-11-09 11:28:26 -0500]          Directory: /var/tmp/pexp-tempsrce-4988hj82
[2023-11-09 11:28:26 -0500]          Time taken: 1.39 second(s)
[2023-11-09 11:28:26 -0500] [ BUSY ] Attempting destination namespace assets clone...
[2023-11-09 11:28:27 -0500] [ PASS ] Destination namespace assets clone succeeded!
[2023-11-09 11:28:27 -0500]          Directory: /var/tmp/pexp-tempdest-4zmvqhey
[2023-11-09 11:28:27 -0500]          Time taken: 0.35 second(s)
[2023-11-09 11:28:27 -0500] [ BUSY ] Reading branches data from the locally cloned assets...
[2023-11-09 11:28:27 -0500] [ PASS ] Branches data reading succeeded!
[2023-11-09 11:28:27 -0500]          Available in source namespace: 2 branch(es)
[2023-11-09 11:28:27 -0500]            - (SRCE branch) HEAD
[2023-11-09 11:28:27 -0500]            - (SRCE branch) main
[2023-11-09 11:28:27 -0500]          Available in destination namespace: 0 branch(es)
[2023-11-09 11:28:27 -0500]          Requested for transferring: 0 branch(es)
[2023-11-09 11:28:27 -0500] [ BUSY ] Initializing namespace assets transfer...
[2023-11-09 11:28:27 -0500] [ WARN ] Transferring 2 available branches
[2023-11-09 11:28:27 -0500] [ FAIL ] Migration failed!
[2023-11-09 11:28:27 -0500]          Exception occurred: Cmd('git') failed due to: exit code(128)
  cmdline: git push freshsrc --set-upstream HEAD --force
  stderr: 'remote: You are not allowed to push code to this project.
fatal: unable to access 'https://gitlab.com/fedora/dei/pagure.git/': The requested URL returned error: 403'
@gridhead
Copy link
Member

Hi @jwflory, did you turn off branch protection rules to allow for force pushes on all branches?

No? Alright - that's on me. I never specified it in the documentation.

With #61 merged, we would have documentation that explains just that so this should not be a problem anymore.

Could you try following the instructions there to see if it works or if I am missing something else?

Thanks!

@gridhead gridhead added the documentation Improvements or additions to documentation label Nov 19, 2023
@gridhead gridhead self-assigned this Nov 19, 2023
@jwflory
Copy link
Member Author

jwflory commented Nov 19, 2023

See this comment.

@jwflory
Copy link
Member Author

jwflory commented Nov 22, 2023

For my future reference, #55 and #56 address API scopes.

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

Successfully merging a pull request may close this issue.

2 participants