C
C
codemania2017-07-11 11:27:41
MySQL
codemania, 2017-07-11 11:27:41

How can I change the git user under which I am sitting?

I had a user1 account on the girhab, I registered user2, generated keys for it with the git command, added a public key to user2's account, assigned an origin repository, but when I tried to push to it, I suddenly received an error:

remote: Premission to user2/projectname.git deinted to user1

It turns out that I am now sitting in git under the old account, how can I change it to a new one, with what command?
Another question:
I also thought: ok, I will add user1's SSH key to user2's account and I can push under user1, but github says "Key is already in use" when I try to add this pub key to the account. So 1 key with only 1 account can work and I need to generate another one for this case or something, so I just generated a new one under user1 when I was sitting out, but why doesn’t it work then? Something got confused...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vladimir, 2019-01-09
@MechanID

Based on the fact that you have Reads / Writes: 99% / 1%
, then it's worth trying to enable Query cache, if the read requests are repetitive, then this will help you.
everything else from MySQLTuner looks ok

P
Pavel, 2019-01-09
@Shutik

How to reduce load on MySQL?

Try multiple insert with a delay. For example - you accumulate statistics in redis, then once every N seconds. With one request you insert the collected records into the database. Well, ssd of course.

R
Roman Gorevoy, 2019-01-25
@roman_gorevoy

Based on the fact that you have Reads / Writes: 99% / 1%

First you need to do the optimization of the tables themselves. Sometimes it is enough to index several key fields in the main work tables and, lo and behold, the load drops sharply. Then you can look in the direction of normalization / denormalization (depending on the features of access to information from the site itself).
Query cache is a good thing, but you can mess with it if you don’t guess with the amount of memory for the cache (query_cache_size) and set it too large, so that all the RAM will be eaten, which will eventually lead to a server crash. On the other hand, if set too small, the CPU load will be high. In general, it is necessary to set and monitor server resources.

E
Eugene, 2019-10-17
@Nc_Soft

Put cache on nginx

M
magazovski, 2017-07-14
@codemania

In the git itself, the concept of user is nominal.
Change command:

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

But this only affects the name that will be substituted in the commit. To have different names in different repositories, you can run c --local instead of --global
But github will authorize you only by key or login password. To force the selection of a key, you can run the following command in the repository folder:
https://git-scm.com/docs/git-config#git-config-cor...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question