Source Control with GitHub

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
ggreen
Posts: 8
Last visit: Mon Apr 25, 2022 9:02 am

Source Control with GitHub

Post by ggreen »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2019 5.6.162
32 or 64 bit version of product: 64 Bit
Operating system: Microsoft Windows 10 1809
32 or 64 bit OS: 64 Bit

*** Please add details and screenshots as needed below. ***
I am attempting to use the 'Source Control' functions of PowerShell Studio with GitHub repositories and am running into difficulties when attempting to push or pull from a repository. I am able to obtain the 'Status' of the remote vs local repositories and am able to push to and pull from the remote repositories via the Git shell or GUI via SSH, but when using the push or pull buttons within PowerShell Studio I get the error below:

git@github.com: Permission denied (publickey).
fatal: could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

Any help you could provide in resolving this issue would be appreciated.
Thanks,
Glen

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Source Control with GitHub

Post by mxtrinidad »

We are currently investigating the issue. We'll get back to you soon.

Thanks
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Source Control with GitHub

Post by mxtrinidad »

There's something missing in the information you provided.

You didn't mention doing a "commit" before doing a "push". Can you provide the message displayed when doing the "commit" option?

Curious! Are you using Azure DevOps repositories? And, which version is Git you're currently using?
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Source Control with GitHub

Post by mxtrinidad »

Just an FYI

Using the Git GUI, make sure to provide both User Name and email.
This is one thing we found out that could prevent us doing updates to the repository.
User avatar
ggreen
Posts: 8
Last visit: Mon Apr 25, 2022 9:02 am

Re: Source Control with GitHub

Post by ggreen »

This morning after adding the username and email address associated with the remote repository to the Git GUI options for this project repository, I made some test modifications to my files in the project, saved them and then tried to commit and received a message that there were no changes to commit. Within the Git GUI it showed my changes as 'Unstaged' so I used the 'Add' button and it then committed the changes to the local repository. When I use the 'Status' button it shows that my local repository is one commit ahead of the remote repository. When attempting to push to the remote repository, it still presents me with the 'permission denied' error specified earlier, but again, I can push from the Git GUI or shell. One piece of information that may or may not also be helpful that I thought of last night after my initial posting is that the SSH key I generated for Git is pass code protected. Is it possible that could be causing the issue for PS Studio?

Additionally this morning I began experiencing another source control issue that may or may not be related and that is that after trying to commit and push to the remote repository, if I change tabs to work on another file in my project, the source control options grey out and the only way I can seem to get them available again is if I close PS Studio and re-open it. Is that possibly a known issue that may be related to the remote repository issues I'm seeing as well?

Thanks,
Glen
User avatar
ggreen
Posts: 8
Last visit: Mon Apr 25, 2022 9:02 am

Re: Source Control with GitHub

Post by ggreen »

As a quick follow-up I did some further investigation into the issue where the source control options are being greyed out and it appears to only be after I open up the Git GUI or Shell that I am unable to use the source control options within PS Studio. This is true whether or not I have closed either the GUI or Shell windows upon completion of tasks within them.

Thanks,
Glen
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Source Control with GitHub

Post by mxtrinidad »

In my scenario, I don't use SSH Key. I just needed to include sign-on when I created my repository from my Azure DevOps Git which is set to "private".
then I'm able to commit my changes without any issues.

Is it a requirement for you to use the SSH Key? I can use Git without SSH Key.
If possible, can you try to avoid using SSH key? Test if it works without it.

About the ribbon losing the focus, we'll be working on getting it fix.
User avatar
ggreen
Posts: 8
Last visit: Mon Apr 25, 2022 9:02 am

Re: Source Control with GitHub

Post by ggreen »

So I re-tested with GitHub using HTTPS and was able to get it to work successfully without an SSH key. The issue I was experiencing after adding in my email address within Git was that I was specifying a private email address instead of the public GitHub email address and I have email address protection enabled on GitHub. After updating the local email address setting to match the public email address in GitHub, I was able to push using an HTTPS connection. Additionally I did some testing with the SSH keys and it seems that if the SSH key I generate within my local Git instance is not passcode protected, I can push to the remote GitHub repos properly and it appears from my testing that PS Studio is just not prompting for or does not know how to deal with the SSH key passcode requirement.

Additionally regarding the ribbon losing focus, it appears to also occur when I do anything interacting with the remote repository and then change tabs. I've duplicated specifically calling up the GUI, the shell, querying for status, or performing a push and then changing tabs to work on a different file in the same project. Hope that helps you to be able to duplicate. If there's any additional information I can provide on these issues to help please let me know. Ultimately though I believe my initial reason for posting is now resolved since I am able to successfully push to a remote Git repo using the built in options, though I'll be looking forward to them not losing focus in future updates. :)

Thanks again,
Glen
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Source Control with GitHub

Post by mxtrinidad »

Awesome! Glad to heard you got it working.

Keep in mind, the options running on the Git ribbon are Git commands. If you need to use SSH Key's, please submit a feature request: https://www.sapien.com/requests .

The issue of the ribbon losing focus has been already reported and will be corrected soon. Unfortunately, this issue will force you to restart the application to get the ribbon working again.

We appreciate your patience!
This topic is 4 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.