You need to be logged in to view a user's profile.
  1. Michael Connell
  2. PowerBuilder
  3. Tuesday, 25 June 2024 10:01 AM UTC

I'm getting an error message when trying to perform a Git Pull from the repository on the server:

Git detail error info: Cannot locate remote-tracking branch 'origin/master'
Git client error code: Requested object could not be found. Because of invalid value in Author, Email, username, password, or local branch name, etc.
Failed to update: <local repository>
Failed to do Git pull.

I generated new credentials for the repository in Azure DevOps on the server and updated the Source Control properties of the Workspace in PowerBuilder. I got no error message when saving these new details, and as far as I can tell there are no problems with any of the details here.

The initial error message seems to indicate a problem with the selection of the branch, but I've checked the branch selected via Git Switch Branch, and there is only one option (master) which corresponds to the one branch (also master) on the server repository.

I can make changes to the local source code and both Commit and Push these - so why does Pull fail?

 P.S. I'm using PB 2022 R3 build 3356.

 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 10:54 AM UTC
  2. PowerBuilder
  3. # 1

 

Hi.

As stated in your initial question, you are using PB 2022 R3. PB 2022+, which doesn't need the pbls on the repository. That was a requirement of previous versions of PB (2017, 2019 and 2021). Of course, the existence of pbls in the repository should not cause any issue. Powerbuilder 2022 + is able to create the pbls using the information contained in ws_objects folder. Now, in older releases, while the pbls were in the remote repository, there was no need to commit and push them after each change. So powerbuilder would never upload them to the remote repository automatically, except upon the initial upload. If for some reason you needed to have an updated version of the pbls to the remote repository, you had to upload them manually. Actually this option is still available in PB 2022+, but you don't need to do that.

Andreas.

Comment
  1. Michael Connell
  2. Wednesday, 26 June 2024 11:13 AM UTC
Andreas,



Thanks for the information. The repositories were created with PB 2019 R3, and we've just upgraded from PB 2021 to PB 2022 R3 which would explain why the PBLs are in the repositories, and why, since I have never updated them manually, they were all marked as out of sync.



In light of what you're saying (and as a result of my experiments described below) it would seem that my idea that the Pull is failing due to the presence of these unsynchronised objects is obviously incorrect.



I noticed whilst using Git CMD that the pull command uses only the remote name: git pull origin, whilst the error message that is being returned uses both the remote and branch names: 'origin/master'. Could this be a pointer to the source of the error perhaps?



Regards,



Michael.
  1. Helpful
  1. Andreas Mykonios
  2. Wednesday, 26 June 2024 11:32 AM UTC
Well origin/master is actually both the information of the remote name and branch name (remote -> origin, branch -> master). If you had additional branches, that information is important, because you state what branch the command should work on. If you have only one branch (probably master), those commands are equivalent.

Andreas.
  1. Helpful
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 10:20 AM UTC
  2. PowerBuilder
  3. # 2

Kitty,

An update to this case.

I have 6 workspaces that are experiencing this particular error.

Using a Git manual I found online I have managed to use Git CMD to successfully stage/commit and push all the changes not apparently seen by the PB IDE up to the remote server. All 6 local repositories are now completely in sync with their equivalent remote repositories.

Despite this I am still experiencing the same error when executing a pull, but am able to commit and push via the PB IDE for all of them.

Note that for all 6 I can execute a pull in Git CMD that completes without a problem.

One thing I have noticed, is that if I make a change to an object, a window say, and then commit and push the change via the PB IDE, then the IDE will show everything in sync. However, if I open the local source code folder I see that the PBL containing the window is still marked as out of sync and a git status shows the PBL is changed and not staged for commit. See attachment Screenshot2.

This means that over time, as I change the various objects in my workspace, each PBL will end up as out of sync with the remote server. Surely this is a bug?

Regards,

Michael.

 

 

 

Attachments (1)
Comment
  1. Robert Cook
  2. Saturday, 20 July 2024 17:35 PM UTC
Note: The new workspace created in the new directory "Product_GitHub" now has to be used to avoid the Git pull error. So you will have to migrate to the new directory for all new work. The old directory "Product" with its old workspace will still create the pull error. To avoid confusion I just deleted the old directory and moved on.
  1. Helpful
  1. Robert Cook
  2. Saturday, 20 July 2024 18:38 PM UTC
I was able to copy the files from the new location (Product_GitHub) and paste / replace them on the old directory (Product). It appears this correct the pull issue for the old directory's workspace.
  1. Helpful
  1. Michael Connell
  2. Monday, 19 August 2024 09:38 AM UTC
Robert,



Thanks for the information. Since posting this case I've retired, which is why this response is so late (apologies for that). I'll make sure that your suggestion is forwarded to my replacement at work.



Regards,



Michael.
  1. Helpful
There are no comments made yet.
Michael Connell Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 06:53 AM UTC
  2. PowerBuilder
  3. # 3

Kitty,

Thanks for your response. Unfortunately executing a Push doesn't solve the problem.

As I mentioned, I can make changes, commit these changes and then Push to the remote server without problem. However a subsequent Pull fails.

That said, I think you might be on to something.

If I open the folder containing my source code, I see that a number of items are marked with a red exclamation mark (see Snapshot1 attached).

I don't know Git, but I'm assuming that this means that these items are not synchronised with the remote server and yet if I try to perform a commit within the PB IDE, the dialogue box is empty, showing no changes.

I'm further guessing that this is because the unsynchronised items are either PBLs or items that are "out of scope" for PB  such as configuration files.

Is there a way to commit and push these items "behind the scenes" as it were? I see that the response to another user with the same problem was to use Git CMD. Unfortunately this particular case remains unsolved, but could this be the way to go?

Regards,

Michael.

 

Comment
There are no comments made yet.
kitty he @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2024 02:28 AM UTC
  2. PowerBuilder
  3. # 4

Hi Michael,

 

You should first execute a push and then a pull. The error occurred because your code hasn't been uploaded to Git yet.

 

Regards,

Kitty

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.