Gh auth login not working for git commands

gh auth login
? What account do you want to log into?
? What is your preferred protocol for Git operations on this host? HTTPS
? Authenticate Git with your GitHub credentials? Yes
? How would you like to authenticate GitHub CLI? Paste an authentication token
Tip: you can generate a Personal Access Token here
The minimum required scopes are 'repo', 'read:org', 'workflow'.
? Paste your authentication token: *********- gh config set -h git_protocol https
âś“ Configured git protocol
! Authentication credentials saved in plain text
âś“ Logged in as Rabcor

followed by

yay -S unreal-engine
==> Starting prepare()...
==> ERROR: You must register at and link your github account to access this private repo. See the wiki for more info:
 -> error making: unreal-engine-exit status 1
 -> Failed to install the following packages. Manual intervention is required:
unreal-engine - exit status 1


I don’t think the gh command lets you add ssh access to Git commands.

From the PKGBUILD:

git ls-remote

This needs your SSH keys to be properly set up.

GitHub has very nicely written article on setting up SSH authentication

If you don’t have SSH key, then follow this: (otherwise skip)

And this is last step (necessary):

Alternatively, you can install unreal-engine-bin which I believe doesn’t need GitHub access.

yay -S unreal-engine-bin

Do note the maintainer’s pinned comment on the listing:

To build this package, you need to:

    Login using you epic account and download the zip file from
    Move the zip file to the same directory as PKGBUILD and install the package using command makepkg -si

Note: Do NOT disable IPv6 as the zen server needs it to start. Please vote for the package if you think it's helpful ;-)

If above 2 options seem difficult, there’s another thing you can try.

In the PKGBUILD for unreal-engine, replace all occurrence of



Use your actual username and token from github.



That’s obviously not my actual token. Thats how a GitHub token usually looks like

And then build the package.

1 Like

It doesn’t seem complicated until the part where i need to actually use the ssh token. I have an ssh key for git but no idea how to use it.

And the https method gives me this error:
URL rejected: Port number was not a decimal number between 0 and 65535

i got it, with gh auth login, i just had to select ssh instead of http, it handled the rest automatically so long as the auth key had the correct permissions.

Also the bin package requires you to download the binaries manually, it doesn’t auto download them (which is kidna odd because after logging in to epic games to download the engine, you can literally just copy paste the download link and it’ll work without being logged in)

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.