Cook the spaghetti in a large pot of salted boiling water until al dente. Reserve some pasta water, then drain the pasta.
In a pan, cook the pancetta over medium heat until crispy. Add the minced garlic and cook for another minute.
In a bowl, whisk together the eggs and Parmesan cheese. Add black pepper to taste.
Add the drained pasta to the pan with pancetta and garlic. Remove the pan from heat.
Quickly pour the egg and cheese mixture over the pasta, tossing continuously to coat the pasta and prevent the eggs from scrambling.
Add a little reserved pasta water to achieve a creamy consistency, if necessary.
Serve the pasta immediately with additional Parmesan cheese and black pepper if desired.