Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection / authentication problem #180

Open
wujastyk opened this issue Jul 21, 2024 · 19 comments
Open

Connection / authentication problem #180

wujastyk opened this issue Jul 21, 2024 · 19 comments
Assignees

Comments

@wujastyk
Copy link

I've had to uninstall this plugin and move over to GitHub Desktop because the oxygenxml git plugin refuses to push commits. I've tried everything I can think of. The permissions on my .ssh directory are fine. My ssh authentication works fine with the command line and with GitHub Desktop. I'm stymied. The error messages are lacunose and don't give me any leads ("can't push").

I'm on Linux Mint + Cinnamon, everything up to date.

@sorincarbunaru
Copy link
Collaborator

Hello!

I would be interested in taking a look at the Git Client logs, perhaps I can spot something fishy in there... For that, I need you to:

  1. Download logback.zip and extract the XML file from inside it.
  2. Copy the "logback.xml" file in the "lib" folder from the Oxygen XML Editor/Author/Developer installation directory.
  3. Restart the application.
  4. Reproduce the push problem.
  5. Close the application. The resulting log files are named "oxygen.log" and "oxygen#.log.qz" (for example, oxygen.log, oxygen1.log.gz, oxygen2.log.gz, etc.) and are located in the "Desktop\oxygenLog" folder.
  6. When done, delete the "logback.xml" file, because it may cause performance issues if left in the "lib" folder.
  7. Add the "Desktop\oxygenLog" folder to an archive and send it to us at support@oxygenxml.com.

Best wishes!

@wujastyk
Copy link
Author

wujastyk commented Jul 23, 2024 via email

@sorincarbunaru sorincarbunaru self-assigned this Jul 24, 2024
@sorincarbunaru
Copy link
Collaborator

Unfortunately, I don't see the attachments.

@wujastyk
Copy link
Author

wujastyk commented Jul 24, 2024 via email

@wujastyk
Copy link
Author

oxygenLog.zip
Screenshot from 2024-07-23 15-37-06

@sorincarbunaru
Copy link
Collaborator

Hi again,

  1. What version of the plugin were you using?
  2. Has it ever worked for you with SSH authentication?
  3. I would suppose the repo was not cloned using the Git Client Add-on, right?
  4. What you could quickly try is to reset the Git Client credentials and see that makes any changes:
    image

@wujastyk
Copy link
Author

On Thu, 25 Jul 2024 at 07:52, Sorin Carbunaru notifications@github.com wrote:

Hi again,

    What version of the plugin were you using?

​The version of yesterday. I fetched and installed it to do your test. 5.3.0

    Has it ever worked for you with SSH authentication?

​Yes, it worked fine until a few weeks ago. I don't know what changed. And plain CLI git, gh, and GitHub Desktop all work with ssh just fine.

    I would suppose the repo was not cloned using the Git Client Add-on, right?

​That's right. I mostly work just with CLI git.

    What you could quickly try is to reset the Git Client credentials and see that makes any changes:
    [image.png (view on web)](https://github.com/user-attachments/assets/0304e97f-1b19-498a-b629-523b9f7f2729)

​I tried that before, no improvement.

I've just reset credentials again, and got this
On Thu, 25 Jul 2024 at 07:52, Sorin Carbunaru notifications@github.com wrote:

Hi again,

    What version of the plugin were you using?

​The version of yesterday. I fetched and installed it to do your test. 5.3.0

    Has it ever worked for you with SSH authentication?

​Yes, it worked fine until a few weeks ago. I don't know what changed. And plain CLI git, gh, and GitHub Desktop all work with ssh just fine.

    I would suppose the repo was not cloned using the Git Client Add-on, right?

​That's right. I mostly work just with CLI git.

    What you could quickly try is to reset the Git Client credentials and see that makes any changes:
    [image.png (view on web)](https://github.com/user-attachments/assets/0304e97f-1b19-498a-b629-523b9f7f2729)

​I tried that before, no improvement.

I've just reset credentials again, and got this
image

@sorincarbunaru
Copy link
Collaborator

This kind of issues, where everything went well for a while then suddenly something bad happened out of the blue, are quite difficult to understand...

Have you changed anything in the SSH configuration lately? Maybe generated a new pair of keys?

What happens if you try to clone that repo to another location on your computer using the Git Client Oxygen add-on? Can you clone it successfully? If yes, can you then push some changes?

If you cannot clone the repo or push the changes, given the fact that you cannot use the Git Client anymore with SSH anyway, I guess we could try a sort of "hard reset". For that you would have to go to [user_home_directory]/.com.oxygenxml.author, look for the options file for your version (e.g. oxyAuthorOptionsSa26.1.xml) and delete all the entries that start with PLUGIN_CUSTOM_OPTIONS.com.oxygenxml.git (they should be grouped together) + the entry with PLUGIN_CUSTOM_OPTIONS.com.oxygenxml.user.credentials.list. Then try again cloning and pushing.

Let me know how it goes.

@wujastyk
Copy link
Author

On Fri, 26 Jul 2024 at 08:11, Sorin Carbunaru notifications@github.com wrote:

This kind of issues, where everything went well for a while then suddenly something bad happened out of the blue, are quite difficult to understand...

​Yes, I agree! I have tried so many ideas, uninstalling, reinstalling, fiddling with .git/config etc. etc. The one constant is that the CLI git works fine, and so does GitHub Desktop.

Have you changed anything in the SSH configuration lately? Maybe generated a new pair of keys?

​No. Also, Github nowadays needs a special "Personal Access Token (PAT)". I haven't changed that either.

What happens if you try to clone that repo to another location on your computer using the Git Client Oxygen add-on? Can you clone it successfully? If yes, can you then push some changes?

Yes, I can clone, but I still can't "talk" to Github.

image

I just tried gitg to see if that worked, but I couldn't push and got the following error message:

image

It seems likely to me that this is the underlying problem affecting Oxygenxml too. I'll work on it now.

@wujastyk
Copy link
Author

I've just spent another couple of hours trying to solve this and I can't. I'm giving up. I will use CLI or Github Desktop. I need to get on with work, not wander in the maze of ssh-land.

@wujastyk
Copy link
Author

If you cannot clone the repo or push the changes, given the fact that you cannot use the Git Client anymore with SSH anyway, I guess we could try a sort of "hard reset". For that you would have to go to [user_home_directory]/.com.oxygenxml.author, look for the options file for your version (e.g. oxyAuthorOptionsSa26.1.xml) and delete all the entries that start with PLUGIN_CUSTOM_OPTIONS.com.oxygenxml.git (they should be grouped together) + the entry with PLUGIN_CUSTOM_OPTIONS.com.oxygenxml.user.credentials.list. Then try again cloning and pushing.

After giving up, I thought I'd give this one last try.

I have a directory ~/.com.oxygenxml/ (not -.author).

I followed your instructions, but no improvement.

@sorincarbunaru
Copy link
Collaborator

sorincarbunaru commented Jul 26, 2024

If you ever want to try again to make your repo work with the Oxygen Git Client, I would expect using another type of key should do the job.

You can generate a new key by following this procedure: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key

I've read that, when generating an RSA key using the command from this procedure, SHA256 is used by default instead of the deprecated SHA1 used for your current key.

Then you need to add the new key to GitHub: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account.

After that, normally you should be able to work just fine with our Git client.

If it still does not work (i read some coments from people for whom it didn't work), try generating an ECDSA or Ed25519 key (example for Ed25519 in the procedure from GitHub).

BTW, I also added an internal issue (ID = EXM-54715) to show a helpful error message when using RSA-SHA1 keys.

@wujastyk
Copy link
Author

wujastyk commented Jul 26, 2024

Yes, I did generate a new key, earlier this morning.
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID+8eD/0hik9LWX9WsawpdGJUgDLc0isb2mBuisgDuoJ wujastyk@gmail.com
and uploaded it to github and did the ssh-add thing on my machine.

Since gitg also doesn't talk to github, I'm quite willing to agree that this is a problem with ssh settings and keys or whatnot, and not specifically oxygenxml. I don't know why git and GH Desktop work just fine when gitg and oxygen don't. I am aware also that the permissions of .ssh files is a common cause of trouble. Here is the script that refreshes my .ssh settings:

#!/bin/bash  -x
find .ssh/ -type f -exec chmod 600 {} \;; find .ssh/ -type d -exec chmod 700 {} \;; find .ssh/ -type f -name "*.pub" -exec chmod 644 {} \;

@sorincarbunaru
Copy link
Collaborator

What does gitg say now, with the new Ed25519 key?

@wujastyk
Copy link
Author

wujastyk commented Jul 29, 2024 via email

@sorincarbunaru
Copy link
Collaborator

@wujastyk, the image was not posted...

@wujastyk
Copy link
Author

@wujastyk, the image was not posted...

image.png

@sorincarbunaru
Copy link
Collaborator

Hello again,

If you go to the "SSH Connections" preferences page, how do your options look like?

image

@wujastyk
Copy link
Author

wujastyk commented Aug 1, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants