http://qs321.pair.com?node_id=11149076


in reply to Re^6: perl in the stars
in thread perl in the stars

See Git Basics - Getting a Git Repository for some info on how to put things into your local repo and perhaps you can take it from there.

Thx, hippo, I keep pecking away at the right markup for these commands, but I just can't get the ball to go down:

fritz@laptop:~/Documents/gitlab1$ git add *.pl fritz@laptop:~/Documents/gitlab1$ git add README.md fritz@laptop:~/Documents/gitlab1$ git commit -m 'Initial project versi +on' 4 files changed, 237 insertions(+) create mode 100755 1.2.solstice.pl create mode 100755 1.betelgeuse.pl create mode 100755 2.betelgeuse.pl create mode 100755 3.betelgeuse.pl fritz@laptop:~/Documents/gitlab1$ git config --global user.name "Aldeb +aran" fritz@laptop:~/Documents/gitlab1$ git config --global user.email tallh +arry66@yahoo.com fritz@laptop:~/Documents/gitlab1$ git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) 1.2.solstice.pl.bak 2.betelgeuse.pl.bak 3.betelgeuse.pl.bak conf_files/ nothing added to commit but untracked files present (use "git add" to +track) fritz@laptop:~/Documents/gitlab1$ git push origin master Username for 'https://gitlab.com': tallharry66@yahoo.com Password for 'https://tallharry66@yahoo.com@gitlab.com': remote: HTTP Basic: Access denied. The provided password or token is i +ncorrect or your account has 2FA enabled and you must use a personal +access token instead of a password. See https://gitlab.com/help/topic +s/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'https://gitlab.com/perlmonks/betelge +use.git/' fritz@laptop:~/Documents/gitlab1$

I'm getting closer, but I'm confused. What was the whole point of setting up an SSH key if they are asking me for a password? BTW, I think I got the password right.

fritz@laptop:~/Documents/gitlab1$ perl -d 1.2.solstice.pl Loading DB routines from perl5db.pl version 1.55 Editor support available. Enter h or 'h h' for help, or 'man perldebug' for more help. main::(1.2.solstice.pl:10): my $file = '/home/fritz/Documents/gitla +b1/1.solstice.txt'; DB<1> c + 1.2.solstice.pl 43 -116 Sun rise is Sun Dec 25 15:13:46 2022 UT Dec'2020 Solstice (UTC): 2022-12-21 21:47:33 Dec'2020 Solstice (TDT): 2022-12-21 21:49:10 Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1> q

Fishing for tips, and have a Happy 4th Day of Solstice! Yay Darkness!!!

Replies are listed 'Best First'.
Re^8: perl in the stars
by hippo (Bishop) on Dec 25, 2022 at 10:17 UTC
    I'm getting closer, but I'm confused. What was the whole point of setting up an SSH key if they are asking me for a password?

    You are getting closer because now your repo has something in it, so that's better.

    You have set up a remote which uses https instead of ssh. Use git remote -v to show the remote URLs and you will see this. Change them to be ssh remotes instead so that you can use your key pair and you should be good to go.


    🦛

Re^8: perl in the stars
by soonix (Canon) on Dec 26, 2022 at 16:33 UTC
    to elaborate on hippo's reply:
    in Re^5: perl in the stars you said:
    git remote add origin https://gitlab.com/perlmonks/betelgeuse.git
    There are two ways to pull from your repository:
    • HTTPS - which uses the same username and password as their web interface, and is usually read only/pull only
    • (implicit) SSH, which uses an URL starting with git@gitlab.com: instead of https://gitlab.com/ and uses the SSH certificate you uploaded on the setup page
    (similiar for other git services)

    By the way, is the "perlmonks" part in your URL real? This would imply your user name there is "perlmonks", since the URLs usually are "username/repo-name.git". If you look at your repo in the web interface, there is a (blue) button "Clone" above the file list, which should show you both URLs for HTTPS and SSH.