Home > Enterprise >  git The requested URL returned error: 403
git The requested URL returned error: 403

Time:02-08

I tried to contribute to Bioconda. However, I got the following error:

$ git clone https://github.com/mictadlo/bioconda-recipes.git
Cloning into 'bioconda-recipes'...
remote: Enumerating objects: 312339, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 312339 (delta 5), reused 4 (delta 0), pack-reused 312323
Receiving objects: 100% (312339/312339), 336.91 MiB | 10.02 MiB/s, done.
Resolving deltas: 100% (172858/172858), done.
Updating files: 100% (18842/18842), done.

$ cd bioconda-recipes
git remote add upstream https://github.com/bioconda/bioconda-recipes.git

$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.

$ git pull upstream master
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
From https://github.com/bioconda/bioconda-recipes
 * branch                  master     -> FETCH_HEAD
 * [new branch]            master     -> upstream/master
Already up to date.

$ git push origin master
Username for 'https://github.com': mictadlo
Password for 'https://[email protected]': 
remote: Permission to mictadlo/bioconda-recipes.git denied to mictadlo.
fatal: unable to access 'https://github.com/mictadlo/bioconda-recipes.git/': The requested URL returned error: 403

What did I miss?

Thank you in advance.

CodePudding user response:

For pushing code into the repo, you need to add an SSH key to your GitHub.

Follow this link for more information: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

CodePudding user response:

You don't have the permissions to push to the official repo. It doesn't seem like you are following the contribution workflow: https://bioconda.github.io/contributor/workflow.html

Typically (as is the case here too) a contributor would not be allowed to push to the repo directly, much less the master branch. You would need to create your own fork of the repo, and create a pull request when you are ready.

  •  Tags:  
  • Related