This is my repository and I want to push it myself.

I have not used GitHub for a long time and now I have created a new repository there, I want to download the project, but it asks for my login and password. So all users of this repo need to know the login and password from my githab to make a commit?

Always on github was, there is a link to the repository, you can make a push.

What has changed now?

  • 3
    When was it possible to push directly into other people's repositories, bypassing pull requests? - ߊߚߤߘ
  • What program did you use before and which one now? Just git or Github Desktop ? And where exactly (at what stage) do you get a username and password? - ߊߚߤߘ
  • @Arhad is no stranger, but his own. I created a new repo and calmly made a push. No problem - Aleksey Timoshchenko
  • @Arhad I use the usual terminal. I write git push origin master and now I receive a request for a login and password - Aleksey Timoshchenko
  • 2
    Apparently you have a reository added via http; change to ssh and add the public key to the githabg - GVArt

1 answer 1

Because push to the repository requires user authentication. Other users will need to enter a username and password from their account, after which they will be checked to see if they have access to push to a specific repository.

To avoid permanent login and password input, there are two options:

  1. Enable login and password caching with git config credential.helper cache

     $ git config credential.helper cache $ git push http://example.com/repo.git Username: <type your username> Password: <type your password> [work for 5 more minutes] $ git push http://example.com/repo.git [your credentials are used automatically] 
  2. Add ssh key to github profile