Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^6: perl in the stars

by hippo (Bishop)
on Dec 19, 2022 at 22:36 UTC ( [id://11148984]=note: print w/replies, xml ) Need Help??


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

fritz@laptop:~/Documents/gitlab1$ git init

This command has worked and has created an empty repo. Nothing you have done after that has put anything into the local repo at all. This is the crux of the problem.

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.


🦛

Replies are listed 'Best First'.
Re^7: perl in the stars
by Aldebaran (Curate) on Dec 25, 2022 at 08:11 UTC
    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!!!

      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.


      🦛

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-22 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found