-2

Is there any way Admin or some officials can find this out i clone the project into wrong machine.

Pavan
  • 1
  • 3
  • There is nothing stored implicitly in the commits that identify the computer the commits were made on. **However**, when you cloned it you left trace data on the server, like in weblogs or whatnot depending on the exact nature of your central git repository host. So most likely there is a way to tell that you did a clone into a machine you were not supposed to do. I seriously doubt anyone digs in those logs just all willy nilly so doubtful that anyone discovers but why not just clean it up and if needs be apologize? Just get rid of the clone and restart properly. – Lasse V. Karlsen Mar 21 '17 at 10:15
  • Thank you @LasseV.Karlsen ..... I just want make sure is there any way admin can able to find it to which machine i clone the project. – Pavan Mar 21 '17 at 12:22
  • If the host you cloned from logs the download then most likely the IP address of your machine is logged there, so I would say yes. – Lasse V. Karlsen Mar 21 '17 at 12:37

2 Answers2

0

No, there isn’t.

Don’t worry about that you cloned the remote repo into a wrong local machine. If you don’t need this local git repo, just delete it. Or it’s ok for you to put it there.

If you are worrying that it may wrongly pushed to remote repo one day. It mainly will hint messages that you should pull first because it’s "old fashioned".

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • Hi @Marina -MSFT ... i comes to know admin can track my iP address is it possible ? – Pavan Mar 22 '17 at 05:34
  • No, unless you clone the repo and add the local machine info in commit message, and then push to remote, so that the remote knows this local machine cloned this repo. – Marina Liu Mar 22 '17 at 05:56
0

Yes, it is possible to log your access to a Git repository by IP address and by the key you used. Logging is often enabled by default, as well. For example, I have a fairly boring Git setup on a server I operate, and I can see the SSH logs in /var/log/auth.log.

Here's a (scrubbed) line from auth.log on my server:

Mar 22 01:23:45 fili sshd[678]: Accepted publickey for git from 256.1.2.3 port 45000 ssh2: RSA de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef

You can see that by default, it didn't log what Git commands I ran, but it did say when I connected, what IP address I used, and what public key I was using. With the right configuration, you could also make it possible to log which Git objects you accessed.

However, this is an understandable mistake. It is incredibly common to accidentally run commands from the wrong machine. Don't try to cover it up.

Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415
  • @Pavan: Do you want me to mind my own business, or do you want me to answer the question? The two options are mutually exclusive. Could you explain what you mean when you say "speak like you are a god"? I have carefully avoided demanding sacrifices or threatening plagues / raining brimstone down upon people, so I'm curious about the "god" comment. – Dietrich Epp Mar 22 '17 at 13:01
  • You are the one who said you made a "mistake", and you said you are "afraid" that you will get discovered. These are the exact words you used… "mistake" and "afraid". Do not misunderstand what I am doing here… I am not passing judgment on you. I am merely informing you that executing commands on the wrong system is an extremely common type of mistake, in fact, it's one of the most common types of mistakes that people make. If you think that I am claiming or even insinuating that I have never made a mistake, then you misunderstand. – Dietrich Epp Mar 23 '17 at 07:55