1

I have a project in eclipse in my local workspace. I created a github public account, created a remote repository, copied the HTTPS clone URL. Then cloned the Git repository to create my local repository, and shared the project with the local repository, configured Git for merge and fetch, and committed my changes to local repository, and then successfully pushed the committed changes to the remote repository. I can see the changes in remote repository. There was username and password fields when I tried to clone the git repository, but I left as blank, and did not give my github account details.

Question: I am so surprised that nowhere I was prompted for a username and password. Does this mean, anybody can push changes to my remote repository? If not, How was I recognized?

spiderman
  • 10,892
  • 12
  • 50
  • 84

1 Answers1

1

then successfully pushed the committed changes to the remote repository

That means you must have logged in to GitHub at one point: even without any repo, you can put your GitHub credentials in the GitHub for Windows/Mac (assuming you are using that GUI)

GitHub log in

Once logged in, any repo you are adding can be push to if the GUI detects that your initial credentials match the owner of that repo.
And as Paul Betts would insist, said credentials are cached.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Good catch. A month back, I installed github for windows and logged in. Did not mind it after that, and now I checked, I am still logged in! Thank you VonC. For all git operations, I am working from eclipse, and sometimes gitbash. Never thought of github for windows in the picture – spiderman Apr 13 '14 at 01:04