Skip to content

Commit

Permalink
Add doc entry for credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchodias committed Nov 13, 2020
1 parent 44b37f5 commit 63b1e56
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docs/Authentication-Credentials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# Authentication Credentials

Iceberg performs two kinds of operations that normally require authentication:
- Git operations, such as clone, checkout, and push.
- Extra API operations, such as accept or reject a Pull Request via GitHub Plugin (which uses their [REST API](https://developer.github.com/v3/)).

The git operation will be authenticated depending on the chosen protocol (SSH or HTTPS). For SSH, only SSH credentials can be used, but for HTTPS, you have two options: Plain-Text and Token Credentials.

The Extra API operations can't be authenticated with SSH credentials.
You need Plain-Text and Token Credentials for these.

When authentication fails in an operation, Iceberg shows a dialog asking for Plain Text Credential, which consists on username and password. But that **may not** be the credential you need. For example, you may need a Token Credentials, explained below.

## Token Credentials

Personal access tokens are an alternative to using passwords for authentication. This is important for GitHub users, since using passwords on API calls [is not supported anymore](https://developer.github.com/changes/2/#--deprecating-password-authentication). Following, we describe the steps to register for token in the image.

First, go to your GitHub account and create a Personal Access Token. You can [follow this guide](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) to do it. Include all "repo" and "user" permissions (scopes).

Second, go to your Pharo image and open Iceberg -> Settings -> Edit credentials -> Add Token, as shown in the screenshot below. Normally, you should fill the 'Username' field with your email. Fill the Host field with 'github.com' to use the token for that server.

![image](images/token-credentials.png)

This wasn't tested on other servers, but it may work for git operations:
- [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)
- [BitBucket](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)

### Scripting

Alternativelly, you can register your credential without using the GUI:

```Smalltalk
IceCredentialStore current
storeCredential: (IceTokenCredentials new
username: '[email protected]';
token: '4a01...e072';
yourself)
forHostname: 'github.com'.
```

## Troubleshooting

For troubleshooting, please refer to the [README's F.A.Q. section](https://github.com/pharo-vcs/iceberg#faq), which is the curret source to handle several issues with authentication.
1 change: 1 addition & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ For the last 20 years, many different flavours of Smalltalk have used Monticello

## Useful Topics

- [Authentication Credentials](Authentication-Credentials.md)
- [Contributing to Iceberg](Contributing-to-Iceberg.md)
- [How to Help](How-to-help-us,-What-you-could-contribute.md)
- [Glossary](Iceberg-glossary.md)
Expand Down
Binary file added docs/images/token-credentials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 63b1e56

Please sign in to comment.