NRC-Research / SNAP-issues

This repository was created to provide a public location to record and display the status of "issues" for the SNAP application. The SNAP developers will acknowledge, provide (and maybe request) feedback on the reported issues, and in general use the information to improve SNAP code.
3 stars 0 forks source link

Git push failed for SNAP model #8

Closed kkt-nrc closed 3 years ago

kkt-nrc commented 3 years ago

when trying to push a snap model using the Model Editor, failure noted Git push failed Git_failed_me.screen.txt

kroc-apt commented 3 years ago

Does saving, closing, and re-opening the model fix the issue? What exactly occurred to lead to this state?

NRCgg commented 3 years ago

Does saving, closing, and re-opening the model fix the issue? What exactly occurred to lead to this state?

This didn't solve the issue.

I have some more information using SNAP 3.1.7 with Git plugin 2.0.2

git clone https://github.com/NRC-Research/Arthur-TRACE-models.git

image

image

More info: When I run "git push" from the command line inside of the working model directory the "push" completes with no problems reported.

kroc-apt commented 3 years ago

After reviewing the described issue we have determined that the problem stems from an incorrect authentication configuration. More specifically, it appears that a personal access token was either not defined, or was defined without the required NRC organization approval. The following steps will guide you through the process of getting the authentication mechanism configured as required:

  1. Create a Personal Access Token (be aware that this token will expire at a time specified during creation) – This token can easily be created using steps outlined in the following link: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

  2. Provide NRC Organization Access to the Personal Access Token – The token created by the previous step must next be registered with the NRC organization authentication mechanism. The steps to do this are outlined in the following link:

https://docs.github.com/en/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on

  1. Clone the Repository using the Authorized Personal Access Token – The repository should be cloned using the following commands: Using GIT Bash commandline enter the following (or whatever GIT engine available):

git clone https://USERNAME>:<PERSONAL_AUTHENTICATION_TOKEN>@github.com/<PATH_TO_REPO.git (i.e. https://kroc-apt:ab7zedfh716@github.com/NRC-Research/Arthur-TRACE-models.git)

  1. Open the model with the Model Editor – Open an med file from within the cloned directory.
  2. Push and Pull - SNAP will now provide the ability to push and pull as desired.

Using these instructions we were able to successfully pull from the repository. The push operation gave us a permission error, but it is suspected that this is intended behavior (we do not have permission to write to the specified repository). We have also successfully tested this process using a sample test github repository. All of this was tested using SNAP 3.1.8 and version 2.0.2 of the GIT plug-in.

Hope this helps!

NRCgg commented 3 years ago

While on a Windows based RESGC instance

I tried the above process (created PAT, checked out from command line using PAT as indicated above), created a branch and made some changes in SNAP - trying to push gives me:

image

I tried pushing from the command line and it pushed with no errors:

$ git push --set-upstream origin cgg-test Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 2 threads Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 3.68 KiB | 1.23 MiB/s, done. Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (2/2), completed with 2 local objects. remote: remote: Create a pull request for 'cgg-test' on GitHub by visiting: remote: https://github.com/NRC-Research/Arthur-TRACE-models/pull/new/cgg-test remote: To https://github.com/NRC-Research/Arthur-TRACE-models.git

When on a RHEL based RESGC instance

I tried the above "PAT" checkout, branch, modify and push and instead got this:

image

Again, pushing from the CLI worked fine:

$ git push Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 6.79 KiB | 0 bytes/s, done. Total 3 (delta 2), reused 0 (delta 0) remote: Resolving deltas: 100% (2/2), completed with 2 local objects. To https://NRCgg:XXXXXXXXXXXXXXXXXXX@github.com/NRC-Research/Arthur-TRACE-models.git e592512..d2055ca cgg-test -> cgg-test

While on GFE Laptop

Same as for RHEL on RESGC

kroc-apt commented 3 years ago

Did you stage and commit before pushing?

NRCgg commented 3 years ago

@kroc-apt

I can get all the windows versions (RESGC and NRC laptop) to push IF I configure git to NOT check SSL verification. That is, while in the checked out model directory:

git config --local http.sslVerify false

The differences I mentioned previously where evidently caused by having the http.sslVerify set in the global config for my account. I don't know why there is an SSL issue though, I imported the cert for github.com. I am not sure I have the SSL stuff figured out though so maybe I am not pointing to the right cert.crt file or using openssl.

The issue with the RHEL version noted above seems to be related to selecting to push to "all remotes". After disabling SSL, if I try to push to the one origin listed then I get this error:

image

ie: the "git-receive-pack" issue

NRCgg commented 3 years ago

git-plugin was updated - closing this issue. Any new issues will be listed separately.