SemihY
SemihY

Reputation: 249

GitHub Pushing for read-only

I m new to Git so I am trying to learn git. Meanwhile When I am working on Git ,

ERROR: Permission to username/file.git denied to Username1. fatal: Could not read from remote repository.

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

I encountered this error. By the way , File is only readable. How can I push ?

By the way git config

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = [email protected]:username/files.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

Upvotes: 1

Views: 3295

Answers (1)

Kjuly
Kjuly

Reputation: 35131

If you want to clone other one's repo and make some contributions to it, you need to fork the repo as your own first. Push commits to your own repo and you can send a "Pull Request" to the original author then.

git clone [email protected]:username/file.git

Here the username must be yours, or an org that you are in. Otherwise, you don't have the permission to update the repo.


B.t.w, a tip for you. You can

$ git remote add origin [email protected]:username/file.git
$ git push -u origin master

Since then you can push it simply by

$ git push

Upvotes: 1

Related Questions