GitHub - fatal: could not read Username for 'https://github.com': No such file or directory
Asked Answered
T

34

250

I have the following problem when I try to pull code using git Bash on Windows:

fatal: could not read Username for 'https://github.com': No such file or directory

I already tried to implement the accepted solution provided here:

However the problem still persists.

After adding/removing origin I still get the same error.

Could advise on this issue?

Thanks!

Take answered 3/3, 2014 at 13:4 Comment(4)
Did you config Username? git config --global user.name "Your Name Here"Ichabod
i already tried that but it isnt referring to my git username, i think it is giving problem for the username of the git repository that i am calling here.Take
Simply rebooting solved it for meMesmerism
Instead of getting distracted by No such file or directory, it is better to assume that the error just shows that you need to add authentication to your command. (Because it is a private repo etc..) For example, by using a Private Access Token.Trevelyan
H
133

Follow the steps to setup SSH keys here: https://help.github.com/articles/generating-ssh-keys

OR

git remote add origin https://{username}:{password}@github.com/{username}/project.git

Update: If you get "fatal: remote origin already exists." then you have to use set-url:

git remote set-url origin https://{username}:{password}@github.com/{username}/project.git
Hyperplane answered 4/4, 2014 at 2:14 Comment(9)
2nd option didn't work because I had already added 'origin github'. I removed the origin [ git remote remove origin ] and then wrote what is in the answer with my username and password and it worked fine.Tambour
instead of deleting and re-adding origin you also can just change the URL using git remote set-url origin https://{username}:{password}@github.com/...Creigh
@Creigh solution works but it stores the user's github account password and let it be read by just typing git remote -vScallop
Chris's option worked for me! I followed it up with Jefferson Silva's and it worked well. Still have an error: cannot spawn sh: No such file or directory message...Rici
Support for password authentication was removed on August 13, 2021.Bombardier
That's good. Just nowadays we need to use a personal access token instead of a passwordToms
Same problem though, a PAT might not let you log in, but anyone can scrape that via git remote -v I'd think. I haven't tried it for obvious reasons.Lozar
Please change from {password} to {personal access token} and it'll work! Password is nowadays obsolete. Here's how to get such a token: edgoad.com/2021/02/…Cormac
We just need to use https://{access_token}@github.com/{username}/{repo_name} with the access token.Discernible
G
54

I faced the exact same problem. This problem occurred when I cloned a repo using HTTPS URL and then tried to push the changes (using Shell on Linux/Mac or Git Bash on Windows):

git clone https://github.com/{username}/{repo}.git

However, when I used SSH URL to clone, this problem didn't occur:

git clone [email protected]:{username}/{repo}.git

In case you already cloned the repo using HTTPS and don't want to redo everything, you may use set-url to change the origin URL to SSH URL:

git remote set-url origin [email protected]:{username}/{repo}.git

Note: I have SSH key added to my GitHub account. Without setting up SSH key, this method will not work either.

BTW, git clone or pull should work without any of these changes. These are needed only when you git push after clone.

Gerstner answered 17/11, 2014 at 13:42 Comment(9)
Okay, but why does this occur?Tuba
I get this message within a Docker container running on gitlab. The base image is python:3.7-slim. So it is not Windows related.Perspicuity
In my case, it was an organisation repo using ssh://git.gartner.comBregenz
@MartinThoma I only experience this error with a Docker container on GitLab when the repo is set to private.Milling
This is not working any more, GitHub removed support work password auth.Dionisio
@Dionisio yeah, that's why you need to use SSH key.Gerstner
@IvanBorshchov you don't need to add SSH key for pulling public repo, you only need it when you try to push any changes. Just pull using SSH url, instead of the https url: git clone [email protected]:{username}/{repo}.gitGerstner
GitLens 13.2.0 in VSCode had its "Fetching ..." message displayed forever with no error message until switching from https to ssh as described here.Waite
I had this problem using cpanel. I had everything setup correctly and it worked for long while until suddenly it didn't, and gave me the OP error while trying to pull in a cron job. I tried this answer, and somehow it fixed it. Not sure what messed up in the first place though.Plaint
C
49

I found my answer here:

edit ~/.gitconfig and add the following:

[url "[email protected]:"]
 insteadOf = https://github.com/

Although it solves a different problem, the error code is the same...

Celestina answered 12/4, 2019 at 16:42 Comment(2)
And now you need an SSH key to make it work, e.g. on pure CI which would just make git clone over https without ssh keys right?Shaffer
My answer really only applies to those who were trying to clone with ssh and got stuck on the https method. To use ssh you need the git@… instead of https://… url.Celestina
Q
25

just check the below

Android Studio -> Preferences -> Version Control -> Git -> Use Credential Helper

Quicksand answered 22/2, 2022 at 7:52 Comment(5)
Can you elaborate under which circumstances is this approach preferred/recommended? Also, can you explain what does the Credential Helper do?Constant
It takes the system credentials in mind. Did work for me. Thanks a lot for this!Brunel
this was my issue as well for updated one the path is settings -> version control -> git -> Use Credential HelperIgnaz
Windows: File > Settings > Git > Use Credential HelperFob
So, this worked for me, and I I'll appreciate to know whyMok
M
15

If you want to continue use https instead ssh, and avoid type into your username and password for security reason.

You can also try Github OAuth token, then you can do git config remote.origin.url 'https://{token}@github.com/{username}/{project}.git' or git remote add origin 'https://{token}@github.com/{username}/{project}.git'

This works for me!

Mulch answered 10/6, 2015 at 7:51 Comment(0)
V
15

For me nothing worked from suggested above, I use the git pull command from Jenkins Shell Script and apparently it takes wrong user name. I spent ages before I found a way to fix it without switching to SSH.

In your the user's folder create .gitconfig file (if you don't have it already) and put your credentials in following format: https://user:[email protected], more info. After your .gitconfig file link to those credentials, in my case it was:

[credential]
   helper = store --file /Users/admin/.git-credentials

Now git will always use those credentials no matter what. I hope it will help someone, like it helped me.

Vortex answered 3/12, 2018 at 14:58 Comment(1)
for me it only worked when i put [credential] helper = store --file /..../.git-credentials in .git/config in my working directoryCharlton
A
12

Note that if you are getting this error instead:

fatal: could not read Username for 'https://github.com': No error

Then you need to update your Git to version 2.16 or later.

Araliaceous answered 10/3, 2018 at 10:13 Comment(0)
C
9

TL;DR: check if you can read/write to /dev/tty. If no and you have used su to open the shell, check if you have used it correctly.

I was facing the same problem but on Linux and I have found the issue. I don't have my credentials stored so I always input them on prompt:

Username for 'https://github.com': foo
Password for 'https://[email protected]': 

The way how git handles http(s) connections is using /usr/lib/git-core/git-remote-https you can see strace here:

stat("/usr/lib/git-core/git-remote-https", {st_mode=S_IFREG|0755, st_size=1366784, ...}) = 0
pipe([9, 10])                           = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f65398bb350) = 18177
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(10)                               = 0
read(9, "", 8)                          = 0
close(9)                                = 0
close(5)                                = 0
close(8)                                = 0
dup(7)                                  = 5
fcntl(5, F_GETFL)                       = 0 (flags O_RDONLY)
write(6, "capabilities\n", 13)          = 13
fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(5, "fetch\noption\npush\ncheck-connecti"..., 4096) = 38
write(6, "option progress true\n", 21)  = 21
read(5, "ok\n", 4096)                   = 3
write(6, "option verbosity 1\n", 19)    = 19
read(5, "ok\n", 4096)                   = 3
stat(".git/packed-refs", {st_mode=S_IFREG|0664, st_size=675, ...}) = 0
lstat(".git/objects/10/52401742a2e9a3e8bf068b115c3818180bf19e", {st_mode=S_IFREG|0444, st_size=179, ...}) = 0
lstat(".git/objects/4e/35fa16cf8f2676600f56e9ba78cf730adc706e", {st_mode=S_IFREG|0444, st_size=178, ...}) = 0
dup(7)                                  = 8
fcntl(8, F_GETFL)                       = 0 (flags O_RDONLY)
close(8)                                = 0
write(6, "list for-push\n", 14)         = 14
read(5, fatal: could not read Username for 'https://github.com': No such device or address
"", 4096)                       = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18177, si_uid=1000, si_status=128, si_utime=6, si_stime=2} ---
exit_group(128)                         = ?
+++ exited with 128 +++

So I tried to call it directly:

echo "list for-push" | strace /usr/lib/git-core/git-remote-https my

and the result:

poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 1 ([{fd=3, revents=POLLIN|POLLRDNORM}])
recvfrom(3, "\27\3\3\1\32", 5, 0, NULL, NULL) = 5
recvfrom(3, "\307|4Q\21\306\334\244o\237-\230\255\336\25\215D\257\227\274\r\330\314U\5\17\217T\274\262M\223"..., 282, 0, NULL, NULL) = 282
openat(AT_FDCWD, "/dev/tty", O_RDONLY)  = -1 ENXIO (No such device or address)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2995, ...}) = 0
read(4, "# Locale name alias data base.\n#"..., 4096) = 2995
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "fatal: could not read Username f"..., 83fatal: could not read Username for 'https://github.com': No such device or address
) = 83
exit_group(128)                         = ?
+++ exited with 128 +++

And here it came to me:

openat(AT_FDCWD, "/dev/tty", O_RDONLY)  = -1 ENXIO (No such device or address)
...
write(2, "fatal: could not read Username f"..., 83fatal: could not read Username for 'https://github.com': No such device or address
) = 83

git-remote-https tries to read credentials via /dev/tty so I tested if it works:

$ echo ahoj > /dev/tty
bash: /dev/tty: No such device or address

But in another terminal:

# echo ahoj > /dev/tty
ahoj

I knew I switched to this user using su so I exited the shell to see how and found out I used command su danman - so I tested it again:

~# su danman -
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
/root$ echo ahoj > /dev/tty
bash: /dev/tty: No such device or address

I probably ignored the message and continued working but this was the reason. When I switched using the correct su - danman everything worked fine:

~# su - danman
danman@speedy:~$ echo ahoj > /dev/tty
ahoj

After this, git started working correctly

Candiot answered 12/8, 2019 at 9:14 Comment(0)
S
8

This error can also happen when trying to clone an invalid HTTP URL. For example, this is the error I got when trying to clone a GitHub URL that was a few characters off:

$ git clone -v http://github.com/username/repo-name.git
Cloning into 'repo-name'...
Username for 'https://github.com': 
Password for 'https://github.com': 
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/username/repo-name.git/'

It actually happened inside Emacs, though, so the error in Emacs looked like this:

fatal: could not read Username for ’https://github.com’: No such device or address

So instead of a helpful error saying that there was no such repo at that URL, it gave me that, sending me on a wild goose chase until I finally realized that the URL was incorrect.

This is with git version 2.7.4.

I'm posting this here because it happened to me a month ago and again just now, sending me on the same wild goose chase again. >:(

Steadfast answered 6/9, 2017 at 4:16 Comment(0)
I
5

Tried everything here, didn't work.

However, when I tried to debug via git config --system --list, I got fatal: unable to read config file '/etc/gitconfig': No such file or directory.

So I did the following,

sudo ln -s $HOME/.gitconfig /etc/gitconfig

and voila, it works.

Impetuosity answered 7/12, 2021 at 7:13 Comment(0)
T
3

I fixed this by installing a newer version of Git. The version I installed is 2.10.2 from https://git-scm.com. See the last post here: https://www.bountysource.com/issues/31602800-git-fails-to-authenticate-access-to-private-repository-over-https

With newer Git Bash, the credential manager window pops up and you can enter your username and password, and it works!

Trevor answered 15/11, 2016 at 15:33 Comment(0)
I
3

For those getting this error in a Jenkins pipeline, it can be fixed by using an SSH Agent plugin. Then wrap your git commands in something like this:

sshagent(['my-ssh-key']) {
    git remote set-url origin [email protected]:username/reponame.git
    sh 'git push origin branch_name'
}
Isidor answered 13/11, 2019 at 17:13 Comment(0)
M
3

I am using GitHub actions where the jobs are configured to accomplish a task. This solution applies to all the CIs (Jenkins, Travis, Circle) where the git command execution environment changes.

job1: Checkout the repository using the github actions actions/checkout@v2 using the personal access token(PAT), The job completed successfully and repository is cloned.

job2: Fetch the tags using the command git fetch --tags. The job failed with the same error

fatal: could not read Username for 'https://github.com': No such file or directory

Reason of failure: When the job changed, the command running environment also changed, even though the repository exists but the github credentials needs to be provided to fetch the tags.

Solution: add this command before fetching the tags in the job2

git config remote.origin.url 'https://${{ your_personal_access_token }}@github.com/${{ github.repository }}'

Note: ${{ expression }} is the github actions yaml syntex to uncover the environment varibales/ to run expressions.

Maishamaisie answered 23/6, 2021 at 4:1 Comment(2)
I was having exactly the same issue using git pull and this worked perfectly. The required permissions are repo and workflow . Set the token in your Github Settings/Secrets and variables/Actions.Aplacental
- name: Sync repository with EC2 env: HOST: ${{ secrets.HOST }} USER: ${{ secrets.USERNAME}} run: | ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa $USER@$HOST "\ git config remote.origin.url 'https://${{ secrets.GH_PAT }}@github.com/${{ secrets.USERNAME}}/YOUR_REPO' && \ git pull origin main" Aplacental
A
3

Here is the simple trick that can work

android studio -> settings -> version control -> git -> use credential helper

have fun

Aquinas answered 16/8, 2022 at 5:45 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Erbium
D
2

Short Answer:

git init
git add README.md
git commit -m "first commit"


git remote add origin https://github.com/{USER_NAME}/{REPOSITORY_NAME}.git
git push --set-upstream origin master

Ignore first three lines if it's not a new repository.

Longer description:

Just had the same problem, as non of the above answers helped me, I have decided to post this solution that worked for me.

Few Notes:

  • The SSH key was generated
  • SSH key was added to GitHub, still had this error.
  • I've made a new repository on GitHub for this project and followed the steps described

As the command line toolm I used GitShell (for Windows, I use Terminal.app on Mac).
GitShell is official GitHub tool, can be downloaded from https://windows.github.com/

Demythologize answered 30/4, 2014 at 9:8 Comment(0)
S
2

Replace your remote url like this:

git remote set-url origin https://<username>@github.com/<username>/<repo>.git
Staghound answered 27/7, 2016 at 12:13 Comment(3)
All the other posts indicate putting the password in the remote url, which will then be stored plain text on disk - a security no no. Only the username is required, the credentials store will request your github username/password and then store it securely to be used automatically.Pechora
in android studio, goto VCS-> GIT -> Remotes and replace the url with https://<username>@github.com/<username>/<repo>.gitCrossbred
@Pechora "store it securely" that is wrong. The credential helper can store it in plaintext. :( Don't make assumptions that something is more secure without knowing how it works, just because someone mentioned it.Hygrometer
S
2
[SSH] executing...
fatal: could not read Username for 'https://github.com': No such device or address

[SSH] completed
[SSH] exit-status: 1

Build step 'Execute shell script on remote host using ssh' marked build as failure
Finished: FAILURE

Sol:- If the repository is private and also it belongs to another person or organisation and you are a contributor of that repository then you can run git commands from Jenkins job and it doesn't prompt you for the username and password.

https://username:token@github.com/accountname/reponame.git

Steinway answered 30/9, 2021 at 18:29 Comment(0)
T
2

I also had the same issue of connecting to my account to a private GitLab repository. I found the solution in this very Stack Overflow page but still having doubts. Posting this image illustrating what needs to be done.

Credential Helper to Resolve Git Account Issue

Tapping answered 29/3, 2023 at 6:6 Comment(1)
Worked for me @Raj, so you're not totally wrong. Thanks.Scauper
S
1

This is an issue with your stored credentials in the system credential cache. You probably have the config variable 'credential.helper' set to either wincred or winstore and it is failing to clear it. If you start the Control Panel and launch the Credential Manager applet then look for items in the generic credentials section labelled git:https://github.com. If you delete these, then the will be recreated next time but the credential helper utility will ask you for your new credentials.

Swob answered 3/3, 2014 at 16:39 Comment(3)
what tool are you referring to i am currently using Bash for windowsTake
yes - so have a look in the Credential Manager Control Panel applet. If there is nothing there as mentioned then check your config - git config --global -l | grep credential. If there is anything output, that will be the utility that is trying to feed your stored credentials to the server when you push.Swob
Mate i think this isnt the problem let me explain , may be you get what i am trying to say,git remote add origin https://github.com/username/Hello-World.git the username which is tied onto this git repo link is making trouble, i dont think my OWN username is making trouble here. As far as i know Credential manger helps managing personal credentials, not the credentials of repository.Take
C
1

In my case I had to setup "personal access token" under GitHub:

  1. settings -> developer settings

  2. and enable SSO.

Carolinacaroline answered 13/5, 2021 at 10:21 Comment(2)
What kind of GitHub Personal Access Token (Pat), Classic or Fine-Grained (Beta)? What permissions were granted?Coinsure
@NomenNescio when I did back then I believe it was a classic, but recently it has been mostly fine grained. So if you're setting up, go for a fine grained with all repo related boxes ticked (like repo:read, repo:write etc) and meta info related.Carolinacaroline
B
1

I had this problem in a ssh jail (jailkit), where /dev/tty was not present. I added this device file with jk_cp and the error went away.

Balcony answered 12/10, 2021 at 20:6 Comment(0)
I
1

If you're encountering this error while running go mod download within a Dockerfile, I experienced a similar issue. What resolved it for me was implementing the following changes in my Dockerfile:

RUN go env -w GOPRIVATE="github.company.com"
RUN git config --global url."ssh://[email protected]".insteadOf "https://github.company.com"
RUN mkdir -p /root/.ssh && ssh-keyscan github.company.com >> /root/.ssh/known_hosts
RUN --mount=type=secret,id=sshKey,dst=/root/.ssh/id_rsa go mod download

This sets the private repository to use SSH instead of HTTPS and ensures that go mod download uses the correct SSH key.

Incorporator answered 7/11, 2023 at 14:28 Comment(0)
I
0

Try using a normal Windows shell such as CMD.

Instigation answered 20/6, 2018 at 8:57 Comment(0)
P
0

Earlier when I wasn't granted permission to access the repo, I had also added the SSH pubkey to gitlab. At the point I could access the repo and run go mod vendor, the same problem as your happens. (maybe because of cache)

go mod vendor

go: errors parsing go.mod:
/Users/macos/Documents/sample/go.mod:22: git ls-remote -q https://git.aaa.team/core/some_repo.git in /Users/macos/go/pkg/mod/cache/vcs/a94d20a18fd56245f5d0f9f1601688930cad7046e55dd453b82e959b12d78369: exit status 128:
    fatal: could not read Username for 'https://git.aaa.team': terminal prompts disabled

After a while trying, I decide to remove the SSH key and terminal prompts filling in username and password. Everything is fine then!

Pare answered 9/12, 2019 at 5:7 Comment(1)
In my case, dont use https, instead try http. Please edit file ./gitconfig [url "[email protected]:"] insteadOf = https://git.aaa.team/Pare
F
0

Double check the repository URL, Github will prompt you to login if the repo doesn't exist.

I'm guessing this is probably to check if it's a private repo you have access to. Possibly to make it harder to enumerate private repos. But this is all conjecture. /shrug

Fid answered 18/1, 2021 at 17:13 Comment(0)
H
0

I got the answer by clearing Invalidate caches and then clean build helped me.

  1. Select 'File > Invalidate Caches / Restart' and then click the 'Invalidate and Restart' button.
  2. Select Build > Clean Project and then select Build > Rebuild Project.
Humpage answered 17/7, 2022 at 19:37 Comment(1)
Of course, those who know will recognize it but you should've mentioned this is only for Intellij Idea users.Katonah
G
0

Here is the simple cause for people who get this error: you are trying to pull from a repo you haven't yet set up your local git to access. For me, I got this error when I changed a public repo to a private one. It's clear to me now that a public repo needs no auth, yet a private one does.

Hope this helps clarify why the error occurs and one potential trigger for that cause.

Gristmill answered 25/7, 2022 at 4:49 Comment(0)
A
0

This solved my problem i ran

git config --global --unset credential.helper

Try using an SSH connection instead of HTTPS. Set up SSH authentication for your GitHub account and update the repository URL in your deployment script to use the SSH format ([email protected]:/.git). This eliminates the need for username and password authentication.

Adigranth answered 4/7, 2023 at 12:22 Comment(0)
S
0

Issue: Git Pull/Push gets stuck when using SSH authentication.

Analysis:

Running ssh -vT [email protected] reveals a hang:

(base) ➜  .ssh ssh -vT [email protected]
OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to github.com [192.30.255.112] port 81.

Running ssh -vT -p 22 [email protected] shows that the connection can be made.

Checking /etc/ssh/ssh_config reveals that the connection port is set to 81.

image-20230803191919046

Solution:

Edit ~/.ssh/config, and write:

Host github.com
    Port 22
Seraphina answered 3/8, 2023 at 11:26 Comment(2)
Thank you for your interest in contributing to the Stack Overflow community. This question already has quite a few answers—including one that has been extensively validated by the community. Are you certain your approach hasn’t been given previously? If so, it would be useful to explain how your approach is different, under what circumstances your approach might be preferred, and/or why you think the previous answers aren’t sufficient. Can you kindly edit your answer to offer an explanation?Billingsley
@JeremyCaney While reviewing the responses to this issue (I might have missed some), I didn't notice anyone pointing out the impact caused by incorrect Port settings, so I've suggested this as a potential troubleshooting method.Seraphina
W
0

I had similar issues updating the repo from jenkins, while it was working good in cmd line without any errors. After changing the repo to public, it worked for me from jenkins as well. Check if the user has enough rights to perform the operation.

Whipping answered 30/1 at 9:39 Comment(1)
This doesn't seem to add anything (helpful) to the question which was originally asked almost 12 years ago.Gambit
D
-1
  1. From the Android Studio terminal execute git pull

    example: test@test:~/StudioProjects/dummy-project-android$ git pull

  2. Add the user name

    example: test@test:~/StudioProjects/dummy-project-android$ "username"

  3. Add the user password

    Password for 'https://[email protected]':"password"

After that, we can perform the rest of the operation

Dasheen answered 6/4, 2022 at 7:1 Comment(0)
P
-1

I meet same problem when pushing a new commit to a private gitlab.

I do git push in a powershell, and seems like I ran "git push" with a "ctrl+c" to stop it.

My solution:

  • start a new git-bash terminal
  • change to the same local repo directory
  • then do git pull and git push
Partizan answered 4/11, 2023 at 9:32 Comment(0)
B
-2

If your repo is private then

Instead of this format

https://github.com/username/<project_name>.git

Use this format

[email protected]/<project_name>.git

You can get a correct url under SSH option

Go To Your Github Repo -> Click on Code -> Select SSH -> Copy your repo URL

Hope this helps.

Baruch answered 17/11, 2022 at 18:0 Comment(0)
T
-17

What worked for me is to change the access of the Git repository from private to public.

Thibault answered 8/2, 2020 at 14:1 Comment(1)
that's not a solution as people may want to keep their repositories privateBombardier

© 2022 - 2024 — McMap. All rights reserved.