• Git questions

    From Avon@21:1/101 to All on Tuesday, February 16, 2021 20:39:19
    I'm trying to get my instance of git working correctly so I can push infopack changes to a repo I have on github.

    In the past I could do this on windows

    git add --all
    git commit -m "updates to infopack files"
    git push infopack master

    On linux I fist cloned the repo

    Then git init
    Then made some changes to files.
    Then git add --all
    git commit -m "updates to infopack files"

    At that point the system barks and says

    [master c24576d] updates for infopack files
    Committer: Avon Kerr <avon@orac.fsxnet.nz>
    Your name and email address were configured automatically based
    on your username and hostname. Please check that they are accurate.
    You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

    After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

    I then run those above commands (once without sudo and the second time with sudo) and changes seem to work

    I then run

    git push -u https://github.com/fsxnet/infopack.git master

    this works after I enter in my github user name and a token I have set up as the password.

    I then make a change to the files locally and re-run the above, the same
    error about usename/email pops up again :( I can't seem to make the name and email I want to use stick.

    Then I try

    git push infopack master fatal: 'infopack' does not appear to be a git repository

    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    It's like it fails to see stuff..? perhaps it's the .git folder in this directory not set with correct linux permissions? Not sure.

    So then I run

    git push https://github.com/fsxnet/infopack.git master

    and it works.

    How do I avoid having to update my username and email each time?
    How do I return to the simple days of git push infopack master ?

    Thanks :)

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From Rushfan@21:2/115 to Avon on Tuesday, February 16, 2021 19:28:35
    BY: Avon(21:1/101)


    |11A|09> |10How do I avoid having to update my username and email each time?|07 |11A|09> |10How do I return to the simple days of git push infopack master ?|07

    You need to save the credentials for git to use. When I use github I typically use a ssh key (and put the public one in github) and use the git:// urls, it seems easier to me and less likely needing to save git https credentials which are different on each platform.

    Can you try:
    git push

    (nothing else). git push wants:

    git push [remote name | URL] [branch name].
    When you did the -u, you set the default branch and you likely have one remote, so you don't need to list it.

    You can do:

    git remote -v

    that'll list the remotes you have. Likely it's called origin (which is default). You could rename it to infopack, but it doesn't need to be.

    Make sense?

    |11r|09ushfan|07



    --- WWIV 5.7.0.3422
    * Origin: Mystic Rhythms BBS (21:2/115)
  • From Avon@21:1/101 to Rushfan on Wednesday, February 17, 2021 19:42:51
    On 16 Feb 2021 at 07:28p, Rushfan pondered and said...

    You need to save the credentials for git to use. When I use github I typically use a ssh key (and put the public one in github) and use the git:// urls, it seems easier to me and less likely needing to save git https credentials which are different on each platform.

    I'd gone with this setting

    git config --global credential.helper store

    And had a token set up already with github that I used as the password when I passed my username..

    The issue of getting in to push without a password seems to be OK for me - phew.

    Can you try:
    git push

    git push
    Everything up-to-date

    So it liked that.

    git push [remote name | URL] [branch name].
    When you did the -u, you set the default branch and you likely have one remote, so you don't need to list it.

    You can do:

    git remote -v

    that'll list the remotes you have. Likely it's called origin (which is default). You could rename it to infopack, but it doesn't need to be.

    avon@orac:/hub/fsxnet/infopack$ git remote -v
    origin https://github.com/fsxnet/infopack.git (fetch)
    origin https://github.com/fsxnet/infopack.git (push)

    is what I see, is that OK? I suspect yes. If I don't need to rename anything I'll leave it alone. Not sure when I would need to? I'm not a daily git user (yet :))

    [time passes]

    I made a small change to the infopack files then did the following..and it
    all seemed to work. The bit that has me stumped is why is it behaving now
    when last night it was unhappy with my name and email when I added the commit -m "comments" line..

    Here's what just happened (seemingly ok)

    avon@orac:/hub/fsxnet/infopack$ git add --all
    avon@orac:/hub/fsxnet/infopack$ git commit -m "updates for infopack files" [master e36d525] updates for infopack files
    1 file changed, 1 insertion(+), 1 deletion(-)
    avon@orac:/hub/fsxnet/infopack$ git push
    Enumerating objects: 5, done.
    Counting objects: 100% (5/5), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 298 bytes | 298.00 KiB/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
    To https://github.com/fsxnet/infopack.git
    20d9f58..e36d525 master -> master

    Perhaps I put it down to 'what a difference a day makes' :) ??

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From Rushfan@21:2/115 to Avon on Wednesday, February 17, 2021 15:52:20
    BY: Avon(21:1/101)


    |11A|09> |10is what I see, is that OK? I suspect yes. If I don't need to rename|07
    |11A|09> |10anything|07
    |11A|09> |10I'll leave it alone. Not sure when I would need to? I'm not a daily git|07
    |11A|09> |10user|07
    |11A|09> |10(yet :))|07

    Yup, that's fine to leave it as-is. origin just means it's a copy of the place you cloned from, and you are likely to only have this one remote (you can add multiple ones and collaborate with folks by pushing changes to someone elses if you have permissions there, and letting them pull from yours, again if they have permissions). MOst folks on github just have onehosted by github that they push and pull to/from.


    |11A|09> |10Perhaps I put it down to 'what a difference a day makes' :) ??|07

    Yup, glad it is working!

    |11r|09ushfan|07



    --- WWIV 5.7.0.3425
    * Origin: Mystic Rhythms BBS (21:2/115)
  • From Avon@21:1/101 to Rushfan on Thursday, February 18, 2021 21:38:24
    On 17 Feb 2021 at 03:52p, Rushfan pondered and said...

    Yup, glad it is working!

    Many thanks for your help :)

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)