E
E
Ella Fitzgerald2016-07-13 11:46:58
git
Ella Fitzgerald, 2016-07-13 11:46:58

How can I add files to my other Github repository?

Good afternoon! I am learning Git for the second day. I'm trying to push files to my second Github remote repository, but I get an error:
"ERROR: Permission denied to deploy key
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists."

There is an SSH key that I created and used for the first repository. Github does not allow reusing this key for the second repository, writes: "The key is already in use". Git bash itself does not ask for a username and password. Tell me, please, what to do, how to add files to the repository? Is it really possible to generate a new SSH key every time?
c966dfb103e341629d3153886e8f6297.jpg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Victor, 2016-07-13
@Elizaveta_Ozerova

As far as I understand, there are two kinds of keys: a deployment key to access a specific repository, and a whole account key to access any repository. deployment cannot be repeated. So either do a new one every time, or use your account key.
In addition, for push, the key must have the "Allow write access" checkbox checked (Can this key be used to push to this repository? Deploy keys always have pull access)

GitHub supports both Account Level public keys, and Project Level keys (aka Deploy Keys). Not allowing reuse of Account Level keys makes sense, but I claim that not allowing it for Deploy Keys doesn't. My one Account Level key allows access to all my projects, so why couldn't I have a Deploy Key that allows access to some of my projects?

F
fetis26, 2016-07-13
@fetis26

And if you first create a repo on Github, then clone and work?

A
Armenian Radio, 2016-07-13
@gbg

Find the id_rsa file on your computer and move it to another folder while working with the second repo.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question