User Friendly Error Message on git/svn Error
When a user tries to push to a remote repository with git or svn the message just tells the user it fails to unauthorized. We should provide a better message that tells the user that it failed due to credentials but also direct them to docs to get additional information.
Message:
You are not authorized to perform this operation.
This may be because you have not setup SSH keys, oAuth or a username/password.
Check the documentation for using Git / SVN for more information on setting these up.
This will be the same message for codenvy.
Referenced issue https://github.com/codenvy/codenvy/issues/968
@JamesDrummond please update the links here (make sure they don't include the version or they'll break later) with a link to the new Code Repositories section. Don't link to a sub-section - those change from time-to-time.
Should we use same links for svn as for git error messages?
That's for @JamesDrummond to answer.
@JamesDrummond are the same docs links for git and SVN okay? Or should they be different?
@bmicklea @vkuznyetsov Updated links above.
@JamesDrummond You wrote in the description:
Please note that for Codenvy onprem this will be different which will refer to Codenvy docs. I will create another issue for that.
Do you mean that Codenvy onprem (customer assembly) and Customer-SAAS (codenvy.io) will have different messages?
@vinokurig codenvy.io will have same messages as onprem. Thought it would be different but probably best to keep them the same.
@JamesDrummond do we have to have the link in the git console, when we have push failed error message:
If yes, in what format it has to be? In plain text format or in the link format? To displaly urls in link format we have to make some changes in console.
The same question is for notifications:
It also needs to be changed if you want to see url in link format there
@vinokurig I was hoping for a window popup that stays up until cancelled. This is where we can provide the links. I updated links above for internal docs. I would like to create a file database like yaml or json to store all docs we link to. This will allow use to globally change links if pages change location. I will add this above.
@JamesDrummond as far as I understood, you want to have one file where all doc urls will be collected and the popup will ask the url from that file. You say that this will solve a problem of changing doc paths, but I don't see a problem to change the path directly in the code by using global search. Another question: Can we have the same path to git-svn doc page in CHE and Codenvy? As for now in CHE the path is: /docs/ide/git-svn/index.html and in Codenvy: /docs/user-guide/git-svn/index.html. This will allow to implement the dialogs only in CHE, Codenvy will inherit those dialogs by maven dependancy
@vinokurig No they have different paths because paths should be able to change per product. I like the docs urls collected in one spot. The dialog for che could maybe use the it's default url storage file and then attempt to load a separate url storage file if it exists that would overwrite those value and/or provide additional value pairs. Codenvy and other custom assembly could provide this separate url storage into the assembly.
We should also create some unit tests that will make sure url paths exist. I would rather this be a warning than error as docs sections/permalinks can change last minute. Maybe we could add url storage file into the docs module/repo. This would allow me to setup tests in the docs build without having to build the entire che assembly. WDYT?
@JamesDrummond that seems more complex than necessary. Can't we simply output an explanation in the Git Push console message? Something like:
You are not authorized to perform this operation.
This may be because you have not setup SSH keys, oAuth or a username/password.
Check the documentation for using Git / SVN for more information on setting these up.
This way we don't ned to create another popup and we avoid directly linking to a docs page that could change. I think generally it'll be pretty easy for people to find the right docs and if they can't they'll let us know by filing a complaint on the repo!
@bmicklea I can remove the pop menu requirement. We can always add the link to docs page later.
My intent was to allow future docs pages and sections to be referred to throughout the che interface by click on a docs icon/link such as "?" next to an item in GUI. But we can discuss this separately.
Updated the above description accordingly.
@JamesDrummond I have updated the authentication error message for git push operation:
The same message appears in notification popup. The message does not contain username/password as you wrote in description because it is related to SVN. In SVN we do not have authentication error message, credentials dialog appears automaticaly.
Is it OK to have such message only for git push operation?
@vinokurig Only for git push.