0

I have authorization by public_key to remote repo and I can get everything from http://someurl/first.git on my local machine, but I have to populate this changes to other environments. To make it possible I have to put there my private_key, clone repo and switch to specified tag. But I don't want to do it because of security reasons.

I'm thinking about creation of my local repo http://someurl/second.git, committing all changes to it and deploy. But I have now idea how to add remote repo to my local? Is it possible? And how to commit to my local repo from remote and switch to needed tag?

2
  • 2
    What do you mean by "populate this changes to other envioronments"? What is this "local repo" you're talking about in "I'm thinking about creation of my local repo someurl/second.git, commiting all changes to it and deploy"? Deploy to where? You need to reword this question, I can't understand what you're trying to say. In general, adding a new remote can be done using the git remote add command - git remote add second http://someurl/second.git but I'm not sure this is what you're looking for. Commented Sep 19, 2012 at 15:59
  • Woudn't simply generating a different public/private key pair that's only used for distributing from the central repo to the others solve the "security reasons"? Commented Sep 19, 2012 at 16:10

1 Answer 1

1

Noufal Ibrahim should post his comment as an answer :

Use git remote add to register a new remote repository, e.g. :

git remote add site2 http://someurl/second.git 

After that, you can push from your local machine to this other repository :

git push site2 myBranch 
Sign up to request clarification or add additional context in comments.

1 Comment

I didn't find the question sufficiently clear to post an answer but if it works for the OP, well and good.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.