github push denied

So, for fun I thought I’d try to push the simplest of corrections, fixing the logo url in safe_network/src/lib.rs
but I don’t know if I’m pushing to the wrong location or if this is simply not available for public to push … looking to QA/Contributing and firstcontributions, I can’t make out the difference from what I did for my own.

$ git clone https://github.com/maidsafe/safe_network.git
Cloning into 'safe_network'...
remote: Enumerating objects: 111827, done.
remote: Counting objects: 100% (4498/4498), done.
remote: Compressing objects: 100% (1192/1192), done.
remote: Total 111827 (delta 3388), reused 4006 (delta 3234), pack-reused 107329
Receiving objects: 100% (111827/111827), 67.53 MiB | 1.61 MiB/s, done.
Resolving deltas: 100% (80590/80590), done.
$ cd ./safe_network
$ git init
Reinitialised existing Git repository in /mnt/vault/SANDBOX/safe_network/.git/
$ git remote set-url origin git@github.com:maidsafe/safe_network.git
$ git config user.email "openforum@davidpbrown.co.uk"
$ git config user.name "davidpbrown"
$ git checkout -b davidpbrown
Switched to a new branch 'davidpbrown'
$ git add ./src/lib.rs
$ git commit -m "logo url fixed"
[davidpbrown 7dff3b9e4] logo url fixed
 1 file changed, 1 insertion(+), 1 deletion(-)
$ git push origin davidpbrown
ERROR: Permission to maidsafe/safe_network.git denied to davidpbrown.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

?

1 Like

By default pushes to the maidsafe repo are not allowed. You will need to fork the repo and do

git remote set-url origin git@github.com:davidpbrown/safe_network.git

You can then push a new branch to your repo and raise a PR to maidsafe/safe_network

5 Likes

You can’t push directly to maidsafe, only to your own repo.

You need to set the maidsafe repo as the upstream repository, your own as origin. I think this happens naturally when you fork maidsafe on github and then clone your fork to a local repository, but you can do it manually. using the git remote add ... command.

Then you change your own repo, push to github, and on github can open a pull request.

Easiest way to learn this will be to read the github docs which are very good and include step by step instructions. Hope this helps a bit.

Just to note the bit not above is the “lint” which is Github being a bit ocd for the message that goes to the push…

So, a bit unclear to me but perhaps most pushes are wanting some message formatted similar to
chore: message

See: GitHub - conventional-changelog/commitlint: 📓 Lint commit messages

This topic was automatically closed after 60 days. New replies are no longer allowed.