GETTING A PUBLIC KEY
First check to see if a ssh key directory exists.
$ cd ~/.ssh
$ lsconfig id_rsa.pub
id_rsa known_hosts
$ mkdir key_backup
$ cp id_rsa* key_backup
$ rm id_rsa*
Here we have an existing keypair, id_rsa
and id_rsa.pub
, which we’ve copied into ~/.ssh/key_backup
before removing. By default, ssh will use keys in ~/.ssh
that are named id_rsa
, id_dsa
or identity
.
Generating a key
If you have an existing keypair you wish to use, you can skip this step.
Now that we’re certain ssh won’t use an existing key, it’s time to generate a new keypair. Lets make an RSA keypair:
$ ssh-keygen -t rsa -C "tekkub@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tekkub/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db tekkub@gmail.com
At the first prompt you can just hit enter to generate the key with the default name. You should use a good passphrase with your key. See Working with SSH key passphrases for more details on why you should use a passphrase and how to avoid re-entering it every time you use your key.
Note: If you don’t use the default key names, or store your keys in a different path, you may need to run ssh-add path/to/my_key
so that ssh knows where to find your key.
Adding the key to your GitHub account
Now launch your browser and open the account page. In the “SSH Public Keys” section click “add another public key”, then paste your public key into the “key” field. If you leave the title blank the key comment (your email) will be used for the title.
REPOSITORY SETUP:
Global setup:
Download and install Git
git config --global user.name "Vamshi Krishna Reddy V"
git config --global user.email vamshi4001@gmail.com
Next steps:
mkdir Twinsight
cd Twinsight
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:vamshi4001/Twinsight.git
git push origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin git@github.com:vamshi4001/Twinsight.git
git push origin master
Import a Subversion Repository
- If the repo you are importing is very large, your import may time out.
- If your subversion repository contains a non-standard directory structure, this import process will probably not work for you.
- This service currently only supports public subversion repositories.
- You can find details on how to run a manual import here.
0 comments:
Post a Comment