S
Get the team in the console. git remote -v And look at the protocol you have access to the repository.If it's https, it's about the next way:https://github.com/USERNAME/OTHERREPOSITORY.git
For ssh, it will be like:git@github.com:USERNAME/OTHERREPOSITORY.git
httpsRequire Git version not below 1.7.10In this case, you always need to indicate the password when you contact the server. Git. https://www.kernel.org/pub/software/scm/git/docs/v1.7.9/gitcredentials.html For a period of time (with 15 minutes default) command data:> git config --global credential.helper cache
If you wish, you can change the standard command time.> git config --global credential.helper "cache --timeout=3600"
(second time)You may also indicate git to keep your data permanently:> git config credential.helper store
At the same time, your data will be stored in an open file of .git-credentials.The team can cancel this opportunity:> git config --unset credential.helper
If you wish, you can have such behaviour for all repositories, so you need to hand over the extra key. --global♪Depending on this construction, your data will be available either in the project catalogue or in the project catalogue. $HOMEFor Git versions below 1.7.10You can provide information for authorization in the url where you have access to the repository, so it needs to be transformed:https://username:password@github.com/USERNAME/OTHERREPOSITORY.git
Change the current url in remote to the specified (as described below in the response) and the authorisation will not be requested.Remember that in this case, your data will be kept in public.For Git version not below 0.99There is an opportunity to build https://stackoverflow.com/questions/6031214 SSHThe only thing I know about working with the evaporated SSH key is build-up. https://help.github.com/articles/generating-ssh-keys/ which would also prevent the introduction of ssh key passwords each time.For starters. https://help.github.com/articles/generating-ssh-keys/ ssh-key with a team:> ssh-keygen
She'll ask for a file name (in many cases you can leave a name on default) and password. If you wish, you can leave the password empty, just press Enter twice when you ask for the password. https://help.github.com/articles/working-with-ssh-key-passphrases/ )Couple of keys appear in the catalogue ~/.ssh/♪ You need to copy the contents of the file. id_rsa.pub (if you didn't put another in the creation of the key) and keep it in your profile on GitHub.After that, we can move to the building. ssh-agent:Do the team:> echo $SSH_AGENT_PID
If ssh-agent Started, his trial number should be returned. In this case, the following paragraph may be missed and the team may proceed. ssh-add♪If the empty line is back, we need to start. ssh-agent before proceeding.Launch. ssh-agent Against:> eval "$(ssh-agent -s)"
# Agent pid 59566
Now we have to add a generated key to ssh-agent:> ssh-add ~/.ssh/id_rsa
If you create ssh access to your key repository, work is likely to be done from programmes.For a repository already established https://help.github.com/articles/changing-a-remote-s-url/ using the team> git remote set-url origin <new-url>
where <new-url> Makes a way in which the necessary protocol is used.