Github write access

14 views
Skip to first unread message

Roland Bengtsson

unread,
Apr 29, 2024, 7:21:35 AM4/29/24
to SmartGit
I have a problem with write access to a repository from Smartgit. 

Background
My company has used a closed framework Bold for Delphi in over 20 years. They bought closed source in the beginning. We continue improve it but couldn't share our changes as we don't own the IP. And Embarcadero that owned IP never changed it.
So I tried to convinced them to release it as opensource. It was not easy, took 8 years but it happened at last see https://github.com/Embarcadero/BoldForDelphi.

I and another guy was maintainer and should have access. But due to internal issues we keep update our private repository and not the public one.

Last week I tried to push a small change to public repository from Smartgit and it failed with error

[04/29/2024 09:15 AM] Commit: Authentication using OAuth failed (see details below)
C:\Attracs\BoldForDelphi_Embarcadero> git.exe commit --cleanup=whitespace --allow-empty --file=C:/Users/DEVELO~1/AppData/Local/Temp/smartgit17399648907608603496/commit3887202233343008527.tmp
[AttracsBold 7041dc4] Add QuickStart textfile
 1 file changed, 4 insertions(+)
 create mode 100644 QuickStart.txt
C:\Attracs\BoldForDelphi_Embarcadero> git.exe -c "credential.helper=C:/Program\ Files/SmartGit/lib/credentials.cmd" push --porcelain --progress origin refs/heads/AttracsBold:refs/heads/AttracsBold
remote: Permission to Embarcadero/BoldForDelphi.git denied to bero.
unable to access 'https://github.com/Embarcadero/BoldForDelphi.git/': The requested URL returned error: 403
Check your GitHub Hosting Provider configuration in the Preferences.

But it works fine if I push the file directly in browser without smartgit with same user.
Now I tried to remove and add Github.com again in preferences.
And this dialog came:

Although you appear to have the correct authorization credentials, the `Embarcadero` organization has enabled OAuth App access restrictions, meaning that data access to third-parties is limited. For more information on these restrictions, including how to enable this app, visit https://docs.github.com/articles/restricting-access-to-your-organization-s-data/

So is the issue that SmartGit ask Embarcadero for access but fail?
Browser don't need this so it work.
To work in browser with github or in console is too cumbersome for me.
I understand that Embarcero that is a big company must have strict security.
But it must allow me to work. Is there something I can tell admin to change in Github preferences for me ? He said I should have full write access and that is confirmed in browser.

Regards
/Roland

syntevo Support

unread,
Apr 29, 2024, 12:14:11 PM4/29/24
to smar...@googlegroups.com
> Now I tried to remove and add Github.com again in preferences.
> And this dialog came:
>
> *Although you appear to have the correct authorization credentials, the
> `Embarcadero` organization has enabled OAuth App access restrictions,
> meaning that data access to third-parties is limited. For more information
> on these restrictions, including how to enable this app, visit
> https://docs.github.com/articles/restricting-access-to-your-organization-s-data/*

I have just updated the docs. Please let us know which of the proposed solutions resolves your problem:

<https://github.com/syntevo/syntevo.github.io/blob/master/SmartGit/Latest/GitHub-integration.md#authentication-fails-with-403-although-you-appear-to-have-the-correct-authorization-credentials>

You can also try version 24.1 Preview, which should be able to handle those configurations.

--
Best regards,
Marc Strapetz
syntevo GmbH
https://www.syntevo.com
> *Although you appear to have the correct authorization credentials, the
> `Embarcadero` organization has enabled OAuth App access restrictions,
> meaning that data access to third-parties is limited. For more information
> on these restrictions, including how to enable this app, visit
> https://docs.github.com/articles/restricting-access-to-your-organization-s-data/*
>
> So is the issue that SmartGit ask Embarcadero for access but fail?
> Browser don't need this so it work.
> To work in browser with github or in console is too cumbersome for me.
> I understand that Embarcero that is a big company must have strict security.
> But it must allow me to work. Is there something I can tell admin to change
> in Github preferences for me ? He said I should have full write access and
> that is confirmed in browser.
>
> Regards
> /Roland
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/4bcbc0f2-a8de-4e9b-9b3d-4dfcdea18b2dn%40googlegroups.com.
>

Roland Bengtsson

unread,
May 5, 2024, 2:52:00 AM5/5/24
to SmartGit
With version 23.1.2 I tried to set
SmartGit Preferences, Low-Level Properties and set json.graphQL.ignoreErrorsIfDataIsPresent and json.graphQL.ignoreNullArrayElements to true

Restart smartgit but still get this 

[05/03/2024 07:56 AM] Commit: Authentication using OAuth failed (see details below)
C:\Attracs\BoldForDelphi> git.exe -c "credential.helper=C:/Program\ Files/SmartGit/lib/credentials.cmd" add --force -- examples\Delphi\Simple\ObjectSpace\CustomAttributes\Readme.txt
C:\Attracs\BoldForDelphi> git.exe -c "credential.helper=C:/Program\ Files/SmartGit/lib/credentials.cmd" commit --file=C:/Users/DEVELO~1/AppData/Local/Temp/smartgit452052564259412335/commit8283993704353163331.tmp -o -- examples\Delphi\Simple\ObjectSpace\CustomAttributes\Readme.txt
[AttracsBold 31168d3] Spell error. Also test write permission for Smartgit
 1 file changed, 1 insertion(+), 1 deletion(-)
C:\Attracs\BoldForDelphi> git.exe -c "credential.helper=C:/Program\ Files/SmartGit/lib/credentials.cmd" push --porcelain --progress origin refs/heads/AttracsBold:refs/heads/AttracsBold

remote: Permission to Embarcadero/BoldForDelphi.git denied to bero.
unable to access 'https://github.com/Embarcadero/BoldForDelphi/': The requested URL returned error: 403

Check your GitHub Hosting Provider configuration in the Preferences.

I also installed smartgit preview 24.1 but I don't know how to configure it.
When I try to authenticate for githib in settings it show dialog


"Although you appear to have the correct authorization credentials, the `Embarcadero` organization has enabled OAuth App access restrictions, meaning that data access to third-parties is limited. For more information on these restrictions, including how to enable this app, visit https://docs.github.com/articles/restricting-access-to-your-organization-s-data/"

So currently I have 2 workarounds.
- Commit directly in browser
- Fork the repository and do pull request

But both are cumbersome. It would be nice if I could push directly from smartgit.

Regards

syntevo Support

unread,
May 5, 2024, 3:30:27 AM5/5/24
to smar...@googlegroups.com
> I also installed smartgit preview 24.1 but I don't know how to configure it.
> When I try to authenticate for githib in settings it show dialog

With version 24.1, please reproduce the problem and send JSON logging:

https://docs.syntevo.com/SmartGit/HowTos/Debugging-JSON-connections.html

--
Best regards,
Marc Strapetz
syntevo GmbH
https://www.syntevo.com



> https://groups.google.com/d/msgid/smartgit/3958b378-07bf-442a-86f8-c7d13542980dn%40googlegroups.com.
>

Roland Bengtsson

unread,
May 8, 2024, 12:46:54 AM5/8/24
to SmartGit
Unfortunately  the problem cannot be reproduced any more as repository author changed permission for Smartgit.
In other words it works fine to push updates from Smartgit now.

/Roland

Reply all
Reply to author
Forward
0 new messages