Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
apostila-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pet-estatistica
apostila-git
Commits
34d37993
Commit
34d37993
authored
9 years ago
by
Walmes Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Adiciona sessão de chaves públicas.
parent
09ff1839
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
git_tuto.Rmd
+70
-0
70 additions, 0 deletions
git_tuto.Rmd
git_tuto.md
+304
-233
304 additions, 233 deletions
git_tuto.md
with
374 additions
and
233 deletions
git_tuto.Rmd
+
70
−
0
View file @
34d37993
...
...
@@ -1815,6 +1815,76 @@ opts_chunk$set(eval=FALSE)
****
## Trabalhando com repositórios remotos
Na etapa que vem a seguir, será solicitado uma senha
(`passphrase`). Você pode forncer uma ou apenas pressinar Enter para
correr o procedimento padrão. O resultado é uma senha gráfica ASCII.
```{r, engine="sh", eval=FALSE}
ssh-keygen -t rsa -C "batman@justiceleague.org"
```
```sh
Generating public/private rsa key pair.
Enter file in which to save the key (/home/batman/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/batman/.ssh/id_rsa.
Your public key has been saved in /home/batman/.ssh/id_rsa.pub.
The key fingerprint is:
66:c1:0b:3a:94:25:83:00:81:9f:40:26:f7:aa:af:3a batman@justiceleague.org
The key's randomart image is:
+--[ RSA 2048]----+
| |
~MMMMMMMMMMMM MMMMMMMMMMMM~
.MMMMMMMMM. MMM .MMMMMMMMM.
MMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMM
.MMMMMMMMMMMMMMMMMMMMMMMMM.
.MMMMMMMMM.
.MMM.
M
| |
+-----------------+
```
O importante é o conteúdo do arquivo `/home/batman/.ssh/id_rsa.pub`. Este
deve ser fornecido ao GitLab (ou GitHub) em uma janela com as chaves. Os
endereços abaixo levam para a mencionada janela. Requer que esteja
logado.
* GitLab: <http://gitab.c3sl.ufpr.br/profile/keys>
* GitHub: <https://github.com/settings/ssh>
Nessa janela deverá ser informado o código gerado pelo
`ssh-keygen`. Você deve copiar o texto do arquivo
`/home/batman/.ssh/id_rsa.pub`, sem moficá-lo, e fornecer ao GitLab.
Para ver/abrir o conteúdo do arquivo no próprio terminal use `less` ou
`cat`. Para copiar do terminal use `ctrl+shift+c`. Para abrir com um
editor de texto, o `gedit` por exemplo, é só passar o nome do arquivo.
```sh
## Mostra o conteúdo do arquivo no próprio terminal.
less /home/batman/.ssh/id_rsa.pub
## Abre o arquivo com o editor de texto Gedit.
gedit /home/batman/.ssh/id_rsa.pub
```
```
ssh-rsa BBBBB3NzaC1yc2EAAAADAQABAAABAQDDuQmvkQ0WgwYQvR16z37tG37Q61ID+Qf4hi8+cARjjSWP7015CAtRnCvmGFSbdFMjz3ZEkp2XzHIyRCKw2hLP57rkFcfioWra6N5/9+z+tPiwr2OzwLfk7J/GAETGA4rtoToV96hf5RvKRhvuqyO5uf5ouBILm1PRpjA/5AkfToWp25/7WC136eGIOSJMFgQ3OuK5U+qSXAwuSdu9Uj1XkVYFDjasA45ZjsnkE6L9bKiYymadshEbWEBHJAWqDErd8srMtBYS/2hodNnjfH7rNHHCo8wZD5GJFz7YUodaBSaSYuHVfrEryaEm/r5787CAiecFAjWEeVq6StM7N/lz batman@justiceleague.org
```
Para conferir a comunicação da sua máquina com o servidor do GitLab do
c3sl ou do GitHub, aplique a instrução `ssh` abaixo.
```sh
## Com gitlab do c3sl.
ssh -T git@gitlab.c3sl.ufpr.br
## Com github.
ssh -T git@github.com
```
### Configurando uma conta no GitHub
### Configurando uma conta no GitLab do c3sl
...
...
This diff is collapsed.
Click to expand it.
git_tuto.md
+
304
−
233
View file @
34d37993
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment