Skip to content
This repository has been archived by the owner on Jan 9, 2018. It is now read-only.

Commit

Permalink
update auth docs
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Aug 26, 2014
1 parent 83944fe commit 71dd109
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Configuration

Use File -> Settings Repository... to configure.
Use File -> Settings Repository to configure.

Specify URL of upstream Git repository. Please note — ssh is not yet supported. Please use HTTP/HTTPS. File URL is supported, you will be prompted to init repository if specified path is not exists or repository is not created.
[GitHub](www.github.com) could be used to store settings.

Check "Update repository from remote on start" if you want automatically update your configuration on IDE start. Otherwise you can use Vcs -> Sync Settings...
Check "Update repository from upstream on start" if you want automatically update your settings on IDE start. Otherwise you can use VCS -> Sync Settings.

On first sync you will be prompted to specify login/password. In case of GitHub strongly recommended to use an [access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use). Do not use your login/password. Leave password empty if you use token instead of login. Bitbucket [doesn't support tokens](https://bitbucket.org/site/master/issue/7735).
## Authentication
On first sync you will be prompted to specify username/password. In case of GitHub strongly recommended to use an [access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use) (leave password empty if you use token instead of username). Bitbucket [doesn't support tokens](https://bitbucket.org/site/master/issue/7735).

If you still want to use username/password instead of access token or your Git hosting provider doesn't support it, recommended to configure [git credentials helper](https://help.github.com/articles/caching-your-github-password-in-git).

OS X Keychain is supported. It means that your credentials could be shared between all IntelliJ Platform based products (you will be promted to grant access if origin application differs from requestor application (credentials were saved in IntelliJ IDEA, but requested from WebStorm).
4 changes: 3 additions & 1 deletion resources/messages/IcsBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ task.set.upstream.title=Setting upstream repository

settings.panel.title=Settings Repository
settings.panel.sync.repositories=Sync repositories\u2026
settings.update.on.start=Update repository from upstream on start

sync.repositories.panel.title=Sync Repositories

login.github.note=Strongly recommended to use an <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use">access token</a>.
login.github.note=Strongly recommended to use an <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use">access token</a>.
settings.upstream.url=Upstream URL\:
11 changes: 4 additions & 7 deletions src/git/JGitCredentialsProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ import org.jetbrains.plugins.settingsRepository.showAuthenticationForm
import org.jetbrains.plugins.settingsRepository.Credentials

class JGitCredentialsProvider(private val credentialsStore: NotNullLazyValue<CredentialsStore>) : CredentialsProvider() {
override fun isInteractive(): Boolean {
return true
}
override fun isInteractive() = true

override fun supports(vararg items: CredentialItem?): Boolean {
for (item in items) {
if (item is CredentialItem.Password) {
continue
}
if (item is CredentialItem.Username) {
if (item is CredentialItem.Password || item is CredentialItem.Username) {
continue
}
return false
Expand Down Expand Up @@ -57,6 +52,8 @@ class JGitCredentialsProvider(private val credentialsStore: NotNullLazyValue<Cre
}
}



if (credentials?.username == null || credentials?.password == null) {
credentials = showAuthenticationForm(credentials, uri.toString(), uri.getHost())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Update repository from remote on start"/>
<text resource-bundle="messages/IcsBundle" key="settings.update.on.start"/>
</properties>
</component>
<component id="1cf3d" class="javax.swing.JCheckBox" binding="shareProjectWorkspaceCheckBox" default-binding="true">
Expand All @@ -29,7 +29,7 @@
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="URL:"/>
<text resource-bundle="messages/IcsBundle" key="settings.upstream.url"/>
</properties>
</component>
<vspacer id="970a3">
Expand Down

0 comments on commit 71dd109

Please sign in to comment.