Closed carltape closed 8 years ago
Hi Carl, It looks to me like it's an authentication problem. How did you set up authentication with Github through https? I personally prefer authentication with ssh through ssh keys on Linux machines. I just tried cloning one of my repos with https but I get the same error. I think in my case it's because I have two-factor authentication enabled on my account. Do you use two-factor?
You don't have to use hub if you are familiar with git. You just have to define two remotes: "origin" for your fork and "upstream" for the central repo. Then you only push to origin and pull from upstream. Then you'll have to go to the web page to create pull-request. Hub provides a command line argument.
As for the local changes reported on when you try to do a "git checkout". It's hard to tell. You can look at the changes it's complaining about with: git diff src/decompose_mesh/module_mesh.f90
Worst case, if you are sure you don't want any of the changes, just create a fresh clone.
Hope it helps, David
On Sat, Mar 26, 2016 at 12:25 AM, Carl Tape notifications@github.com wrote:
I'm trying to commit changes to the specfem3d repository. I am starting from these instructions: https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM These instructions do not seem to work for me. I regularly use github for other repos (and from this cluster), though I'm not at all a git master. Somehow something is different with my setup of specfem3d. Please let me know if you have suggestions. Thanks.
As of 2016-03-24, these do not work using this versions of git and hub:
pacman12 % git --version git version 1.8.2.3 hub version 2.2.3
Here is the first error, following a clone of the specfem3d repository:
pacman12 % git checkout -b devel origin/devel error: Your local changes to the following files would be overwritten by checkout:
utils/EXTERNAL_CODES_coupled_with_SPECFEM3D/AxiSEM_for_SPECFEM3D/VM_examples_to_actualise/prem/run_specfem3D/set_path_and_params.sh Please, commit your changes or stash them before you can switch branches. Aborting
I do not know what these modified files are (the repo should be clean). But one fix is this:
git reset --hard HEAD git checkout -b devel origin/devel
Then there are also modified files listed in the devel repo:
pacman12 % git status . On branch devel Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
# modified: src/decompose_mesh/module_mesh.f90 modified: utils/EXTERNAL_CODES_coupled_with_SPECFEM3D/AxiSEM_for_SPECFEM3D/AxiSEM_modif_for_coupling_with_specfem/SOLVER/submit_sb.csh
# no changes added to commit (use "git add" and/or "git commit -a")
Again, I do this to get rid of these apparent modifications:
git reset --hard HEAD pacman12 % git status . On branch devel
nothing to commit, working directory clean
The next issue is that the command "git fork" does not work as is
pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
This might involve an issue with the remote origin
pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
First attempt to change the remote origin
git remote set-url origin https://carltape@github.com/geodynamics/specfem3d.git
git fork still fails:
pacman12 % git remote -v origin https://carltape@github.com/geodynamics/specfem3d.git (fetch) origin https://carltape@github.com/geodynamics/specfem3d.git (push) pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
The fix is to create a fork from the specfem github page (click "Fork"): https://github.com/geodynamics/specfem3d
I resume with the same repository that was cloned above. The only thing I do is reset the remotes:
pacman12 % git remote rename origin upstream pacman12 % git remote add origin https://carltape@github.com/geodynamics/specfem3d.git pacman12 % git remote -v origin https://carltape@github.com/geodynamics/specfem3d.git (fetch) origin https://carltape@github.com/geodynamics/specfem3d.git (push) upstream https://carltape@github.com/geodynamics/specfem3d.git (fetch) upstream https://carltape@github.com/geodynamics/specfem3d.git (push)
I then make a couple changes in the repository (git add, git commit), then commit them to my local version. Then try to push the changes to my forked repository:
pacman12 % git push error: The requested URL returned error: 403 Forbidden while accessing https://carltape@github.com/geodynamics/specfem3d.git/info/refs?service=git-receive-pack fatal: HTTP request failed pacman12 %
This error is ubiquitous among github users, and some suggested solutions are here:
https://help.github.com/articles/https-cloning-errors/
I don't see what to try.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
Another thought. You define the remotes origin and upstream to be the same: https://carltape@github.com/geodynamics/specfem3d.git origin should be your fork. I am guessing your fork is: https://github.com/carltape/specfem3d.git Maybe the permission problem you are having when trying to push is that you don't have push permissions to the central repo. You should only push toward your fork.
On Sat, Mar 26, 2016 at 8:44 AM, David Luet luet@princeton.edu wrote:
Hi Carl, It looks to me like it's an authentication problem. How did you set up authentication with Github through https? I personally prefer authentication with ssh through ssh keys on Linux machines. I just tried cloning one of my repos with https but I get the same error. I think in my case it's because I have two-factor authentication enabled on my account. Do you use two-factor?
You don't have to use hub if you are familiar with git. You just have to define two remotes: "origin" for your fork and "upstream" for the central repo. Then you only push to origin and pull from upstream. Then you'll have to go to the web page to create pull-request. Hub provides a command line argument.
As for the local changes reported on when you try to do a "git checkout". It's hard to tell. You can look at the changes it's complaining about with: git diff src/decompose_mesh/module_mesh.f90
Worst case, if you are sure you don't want any of the changes, just create a fresh clone.
Hope it helps, David
On Sat, Mar 26, 2016 at 12:25 AM, Carl Tape notifications@github.com wrote:
I'm trying to commit changes to the specfem3d repository. I am starting from these instructions: https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM These instructions do not seem to work for me. I regularly use github for other repos (and from this cluster), though I'm not at all a git master. Somehow something is different with my setup of specfem3d. Please let me know if you have suggestions. Thanks.
As of 2016-03-24, these do not work using this versions of git and hub:
pacman12 % git --version git version 1.8.2.3 hub version 2.2.3
Here is the first error, following a clone of the specfem3d repository:
pacman12 % git checkout -b devel origin/devel error: Your local changes to the following files would be overwritten by checkout:
utils/EXTERNAL_CODES_coupled_with_SPECFEM3D/AxiSEM_for_SPECFEM3D/VM_examples_to_actualise/prem/run_specfem3D/set_path_and_params.sh Please, commit your changes or stash them before you can switch branches. Aborting
I do not know what these modified files are (the repo should be clean). But one fix is this:
git reset --hard HEAD git checkout -b devel origin/devel
Then there are also modified files listed in the devel repo:
pacman12 % git status . On branch devel Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
# modified: src/decompose_mesh/module_mesh.f90 modified: utils/EXTERNAL_CODES_coupled_with_SPECFEM3D/AxiSEM_for_SPECFEM3D/AxiSEM_modif_for_coupling_with_specfem/SOLVER/submit_sb.csh
# no changes added to commit (use "git add" and/or "git commit -a")
Again, I do this to get rid of these apparent modifications:
git reset --hard HEAD pacman12 % git status . On branch devel
nothing to commit, working directory clean
The next issue is that the command "git fork" does not work as is
pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
This might involve an issue with the remote origin
pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
First attempt to change the remote origin
git remote set-url origin https://carltape@github.com/geodynamics/specfem3d.git
git fork still fails:
pacman12 % git remote -v origin https://carltape@github.com/geodynamics/specfem3d.git (fetch) origin https://carltape@github.com/geodynamics/specfem3d.git (push) pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
The fix is to create a fork from the specfem github page (click "Fork"): https://github.com/geodynamics/specfem3d
I resume with the same repository that was cloned above. The only thing I do is reset the remotes:
pacman12 % git remote rename origin upstream pacman12 % git remote add origin https://carltape@github.com/geodynamics/specfem3d.git pacman12 % git remote -v origin https://carltape@github.com/geodynamics/specfem3d.git (fetch) origin https://carltape@github.com/geodynamics/specfem3d.git (push) upstream https://carltape@github.com/geodynamics/specfem3d.git (fetch) upstream https://carltape@github.com/geodynamics/specfem3d.git (push)
I then make a couple changes in the repository (git add, git commit), then commit them to my local version. Then try to push the changes to my forked repository:
pacman12 % git push error: The requested URL returned error: 403 Forbidden while accessing https://carltape@github.com/geodynamics/specfem3d.git/info/refs?service=git-receive-pack fatal: HTTP request failed pacman12 %
This error is ubiquitous among github users, and some suggested solutions are here:
https://help.github.com/articles/https-cloning-errors/
I don't see what to try.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
Hi David,
Thanks for helping. Hopefully in the process of resolving this, I can improve the instructions. https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM
pacman12 % git remote -v origin https://carltape@github.com/specfem3d.git (fetch) origin https://carltape@github.com/specfem3d.git (push) upstream https://carltape@github.com/geodynamics/specfem3d.git (fetch) upstream https://carltape@github.com/geodynamics/specfem3d.git (push)
But I still see this message
pacman12 % git push error: The requested URL returned error: 403 Forbidden while accessing https://carltape@github.com/geodynamics/specfem3d.git/info/refs?service=git-receive-pack fatal: HTTP request failed
To this end, I will step through these again: https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM
config_repo is installed then the clone command (takes a few minutes) From this "clean" clone, we see modified files:
pacman12 % git status .
directory) #
src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_habo.c
utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/OLD_version/README
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 %
git checkout -b devel origin/devel
pacman12 % git checkout -b devel origin/devel Checking out files: 100% (1027/1027), done. M doc/mesh_numbering_convention/numbering_convention_27_nodes.pdf M src/decompose_mesh/scotch_5.1.12b/src/Makefile M src/decompose_mesh/scotch_5.1.12b/src/libscotch/mesh_io_habo.c M utils/ADJOINT_TOMOGRAPHY_TOOLS/iterate_adj/misfit_plot/OLD_version/README M utils/unused_routines/check_buffers_2D.f90 Branch devel set up to track remote branch devel from origin. Switched to a new branch 'devel'
So things are already not what they should be, right?
Still, I can proceed with the instructions: config_repo carltape
pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
As I wrote in the earlier email, I can do [git reset --hard HEAD] to removed these modified files, but at that point I'm deviating from the instructions, whereas I feel like either the instructions or the repo need to be the fix.
I'm happy to test anything. My goal here is to push some minor REAME changes to specfem3d. But another goal is to establish instructions that will work for all. Thanks.
(github is blocking the last text on my comment from showing. Alas, I don't actually want wany markdown styling or formatting. hopefully it will appear here)
As I wrote in the earlier comment, I can do [git reset --hard HEAD] to removed these modified files, but at that point I'm deviating from the instructions, whereas I feel like either the instructions or the repo need to be the fix.
I'm happy to test anything. My goal here is to push some minor REAME changes to specfem3d. But another goal is to establish instructions that will work for all. Thanks.
Hi Carl, I tried following the instructions at: https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM
starting from scratch, meaning:
My version of git is slightly higher than yours. I doubt that this is the problem, but do you have access to another machine with a newer version of git? On my Mac (Mac OS 10.10.5) I have git version 2.6.0.
What I find weird in your e-mail is that your clean clone seems to already have some modifications. Did you do $ rm -Rf specfem3d before you did $ git clone geodynamics/specfem3d
As for the remotes, that's what they look like for me, using hub: $ git remote -v luet git@github.com:luet/specfem3d.git (fetch) luet git@github.com:luet/specfem3d.git (push) origin git@github.com:geodynamics/specfem3d.git (fetch) origin git@github.com:geodynamics/specfem3d.git (push)
So I was wrong earlier about origin vs. upstream. I think your origin should say "(pull)" instead of "(pull)" because I have push permissions but you don't.
Let me know how it goes. Best, David
On Sat, Mar 26, 2016 at 12:23 PM, Carl Tape notifications@github.com wrote:
(github is blocking the last text on my comment from showing. Alas, I don't actually want wany markdown styling or formatting. hopefully it will appear here)
As I wrote in the earlier email, I can do [git reset --hard HEAD] to removed these modified files, but at that point I'm deviating from the instructions, whereas I feel like either the instructions or the repo need to be the fix.
I'm happy to test anything. My goal here is to push some minor REAME changes to specfem3d. But another goal is to establish instructions that will work for all. Thanks.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-201881671
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
"(pull)" instead of "(pull)"
Do you mean instead of "(push)"? But no, local git has no idea that you don't have permission to push to a remote.
Yes, Elliot, that's what I meant. Thanks. Maybe you are right. I wasn't certain because it's hub not plain git and so I thought they might get the permissions from GitHub's API. Thanks, David
On Sat, Mar 26, 2016 at 6:10 PM, Elliott Sales de Andrade < notifications@github.com> wrote:
"(pull)" instead of "(pull)"
Do you mean instead of "(push)"? But no, local git has no idea that you don't have permission to push to a remote.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-201940243
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
Anyway, like I said in email, @carltape's devel
branch is still tracking the geodynamics repo (the upstream remote, formerly named origin), so it won't have permission for it. Try being more explicit: git push origin devel
and you can change the tracking with git push -u origin devel
(but it's still better to work with feature branches.)
Hi David, thanks for trying this from scratch. https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM I have copied my output below. I guess the disturbing thing is that you and I reach different outcomes with the same instructions. (Do you see the modified files like I do?) I deleted my fork of specfem3d on the github website. I am starting this all from a clean directory. I get the same outcome as before -- with no fork possible from the command line.
Our git versions are slightly different, but we will have bigger issues if this is the problem. The git version with the centos (6) package manager is 1.7.1, so we already require something more recent than that. I'm using 1.8.2.3 on our cluster.
Your remotes look different from mine. Maybe that is after you forked, not before (like mine).
Do you think it would be worth trying to establish some instructions that start with forking from the github website? This seems like a trivial first move. Though of course I'd like to understand why I cannot achive what you are achieving from the command line.
pacman12 % ls
pacman12 % git --version
git version 1.8.2.3
hub version 2.2.3
pacman12 % git clone geodynamics/specfem3d
Cloning into 'specfem3d'...
remote: Counting objects: 32888, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 32888 (delta 5), reused 0 (delta 0), pack-reused 32856
Receiving objects: 100% (32888/32888), 342.19 MiB | 2.20 MiB/s, done.
Resolving deltas: 100% (24625/24625), done.
Checking out files: 100% (3760/3760), done.
pacman12 % ls
specfem3d
pacman12 % cd specfem3d/
pacman12 % git status .
.# On branch master
.# Changes not staged for commit:
.# (use "git add
Hi Carl, Yes my remotes look different because this is after hub created the fork. The part I don't understand is why you have code changes right after you cloned. What happens if you run: $ git diff src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c $ git diff utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
There are some instructions on how to use git instead of hub: https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics More precisely, you can start at that point: https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository If you decide to go that way, which I think you should, make sure you unalias git. Best, David
On Sun, Mar 27, 2016 at 2:13 PM, Carl Tape notifications@github.com wrote:
Hi David, thanks for trying this from scratch. I have copied my output below. I guess the disturbing thing is that you and I reach different outcomes with the same instructions. (Do you see the modified files like I do?) I deleted my fork of specfem3d on the gihub website. I am starting this all from a clean directory. I get the same outcome as before -- with no fork possible from the command line.
Our git versions are slightly different, but we will have bigger issues if this is the problem. The git version with the centos 6 distribution is 1.7.1, so we already require something more recent than that. I'm using 1.8.2.3 on our cluster.
Your remotes look different from mine. Maybe that is after you forked, not before (like mine).
Do you think it would be worth trying to establish some instructions that start with forking from the github website? This seems like a trivial first move. Though of course I'd like to understand why I cannot achive what you are achieving from the command line.
pacman12 % ls pacman12 % git --version git version 1.8.2.3 hub version 2.2.3 pacman12 % git clone geodynamics/specfem3d Cloning into 'specfem3d'... remote: Counting objects: 32888, done. remote: Compressing objects: 100% (32/32), done. remote: Total 32888 (delta 5), reused 0 (delta 0), pack-reused 32856 Receiving objects: 100% (32888/32888), 342.19 MiB | 2.20 MiB/s, done. Resolving deltas: 100% (24625/24625), done. Checking out files: 100% (3760/3760), done. pacman12 % ls specfem3d pacman12 % cd specfem3d/ pacman12 % git status . On branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
# modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c modified: utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git checkout -b devel origin/devel Checking out files: 100% (1027/1027), done. M src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c M utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90 Branch devel set up to track remote branch devel from origin. Switched to a new branch 'devel' pacman12 % config_repo your_github_name pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202116558
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
Hi David,
Thank you for pointing me to this new set of instructions: https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository They are quite different from the other instructions I was trying before.
So I start by cloning from the website, as suggested. Then proceed (note: no hub) as shown below. Again I am encountering modified files from the clone. If I run "git diff" on any of these three files shown below, NOTHING is returned. So it's like a marked modified file that seems to have no modifications.
I repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
I again repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
So regarding these modified files -- which, for me, cause things to fail -- perhaps I've just hit a github issue that is (widely?) known. Am I the only one on the planet that sees this? :) If so, I guess I can insert a [git reset --hard HEAD] and just keep going, but that kind of kludge does not inspire much confidence (in myself or in github).
Thanks, Carl
pacman12 % git --version git version 1.8.2.3 pacman12 % git clone https://github.com/carltape/specfem3d.git SPECFEM3D Cloning into 'SPECFEM3D'... remote: Counting objects: 32888, done. remote: Total 32888 (delta 0), reused 0 (delta 0), pack-reused 32888 Receiving objects: 100% (32888/32888), 342.15 MiB | 9.82 MiB/s, done. Resolving deltas: 100% (24648/24648), done. Checking out files: 100% (3760/3760), done. pacman12 % cd SPECFEM3D/ pacman12 % git status .
#
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git remote add upstream https://github.com/geodynamics/specfem3d.git pacman12 % git fetch upstream From https://github.com/geodynamics/specfem3d
P.S. Sorry the bottom half of my post is commented out by github. Not sure how to force it to be visible (I just want basic text).
Hi Carl, This is strange. Could you try on a different computer?
On Mon, Mar 28, 2016 at 1:34 AM, Carl Tape notifications@github.com wrote:
Hi David,
Thank you for pointing me to this new set of instructions:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository They are quite different from the other instructions I was trying before.
So I start by cloning from the website, as suggested. Then proceed (note: no hub) as shown below. Again I am encountering modified files from the clone. If I run "git diff" on any of these three files shown below, NOTHING is returned. So it's like a marked modified file that seems to have no modifications.
I repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
I again repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
So regarding these modified files -- which, for me, cause things to fail -- perhaps I've just hit a github issue that is (widely?) known. Am I the only one on the planet that sees this? :) If so, I guess I can insert a [git reset --hard HEAD] and just keep going, but that kind of kludge does not inspire much confidence (in myself or in github).
Thanks, Carl
pacman12 % git --version git version 1.8.2.3 pacman12 % git clone https://github.com/carltape/specfem3d.git SPECFEM3D Cloning into 'SPECFEM3D'... remote: Counting objects: 32888, done. remote: Total 32888 (delta 0), reused 0 (delta 0), pack-reused 32888 Receiving objects: 100% (32888/32888), 342.15 MiB | 9.82 MiB/s, done. Resolving deltas: 100% (24648/24648), done. Checking out files: 100% (3760/3760), done. pacman12 % cd SPECFEM3D/ pacman12 % git status .
On branch master
Changes not staged for commit:
(use "git add
..." to update what will be committed) (use "git checkout --
..." to discard changes in working directory) #
modified: EXAMPLES/fault_examples/tpv102/TPV102.py
modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h
modified: src/specfem3D/update_displacement_scheme.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git remote add upstream https://github.com/geodynamics/specfem3d.git pacman12 % git fetch upstream From https://github.com/geodynamics/specfem3d
- [new branch] devel -> upstream/devel
- [new branch] master -> upstream/master pacman12 % git checkout --track origin/devel error: Your local changes to the following files would be overwritten by checkout: src/specfem3D/update_displacement_scheme.f90 Please, commit your changes or stash them before you can switch branches. Aborting pacman12 %
On Sun, Mar 27, 2016 at 1:37 PM, David Luet notifications@github.com wrote:
Hi Carl, Yes my remotes look different because this is after hub created the fork. The part I don't understand is why you have code changes right after you cloned. What happens if you run: $ git diff src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c $ git diff utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
There are some instructions on how to use git instead of hub:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics More precisely, you can start at that point:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository If you decide to go that way, which I think you should, make sure you unalias git. Best, David
On Sun, Mar 27, 2016 at 2:13 PM, Carl Tape notifications@github.com wrote:
Hi David, thanks for trying this from scratch. I have copied my output below. I guess the disturbing thing is that you and I reach different outcomes with the same instructions. (Do you see the modified files like I do?) I deleted my fork of specfem3d on the gihub website. I am starting this all from a clean directory. I get the same outcome as before -- with no fork possible from the command line.
Our git versions are slightly different, but we will have bigger issues if this is the problem. The git version with the centos 6 distribution is 1.7.1, so we already require something more recent than that. I'm using 1.8.2.3 on our cluster.
Your remotes look different from mine. Maybe that is after you forked, not before (like mine).
Do you think it would be worth trying to establish some instructions that start with forking from the github website? This seems like a trivial first move. Though of course I'd like to understand why I cannot achive what you are achieving from the command line.
pacman12 % ls pacman12 % git --version git version 1.8.2.3 hub version 2.2.3 pacman12 % git clone geodynamics/specfem3d Cloning into 'specfem3d'... remote: Counting objects: 32888, done. remote: Compressing objects: 100% (32/32), done. remote: Total 32888 (delta 5), reused 0 (delta 0), pack-reused 32856 Receiving objects: 100% (32888/32888), 342.19 MiB | 2.20 MiB/s, done. Resolving deltas: 100% (24625/24625), done. Checking out files: 100% (3760/3760), done. pacman12 % ls specfem3d pacman12 % cd specfem3d/ pacman12 % git status . On branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
# modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c modified: utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git checkout -b devel origin/devel Checking out files: 100% (1027/1027), done. M src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c M utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90 Branch devel set up to track remote branch devel from origin. Switched to a new branch 'devel' pacman12 % config_repo your_github_name pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
— You are receiving this because you commented. Reply to this email directly or view it on GitHub <
https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202116558
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub < https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202148902
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202241752
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
At what point do you see the problems with the changed files. Is it right after you clone your fork? i.e. after you do: $ rm -Rf specfem3d $ git clone git@github.com:carltape/specfem3d.git $ cd specfem3d $ git status
On Mon, Mar 28, 2016 at 8:00 AM, David Luet luet@princeton.edu wrote:
Hi Carl, This is strange. Could you try on a different computer?
On Mon, Mar 28, 2016 at 1:34 AM, Carl Tape notifications@github.com wrote:
Hi David,
Thank you for pointing me to this new set of instructions:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository They are quite different from the other instructions I was trying before.
So I start by cloning from the website, as suggested. Then proceed (note: no hub) as shown below. Again I am encountering modified files from the clone. If I run "git diff" on any of these three files shown below, NOTHING is returned. So it's like a marked modified file that seems to have no modifications.
I repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
I again repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
So regarding these modified files -- which, for me, cause things to fail
perhaps I've just hit a github issue that is (widely?) known. Am I the only one on the planet that sees this? :) If so, I guess I can insert a [git reset --hard HEAD] and just keep going, but that kind of kludge does not inspire much confidence (in myself or in github).
Thanks, Carl
pacman12 % git --version git version 1.8.2.3 pacman12 % git clone https://github.com/carltape/specfem3d.git SPECFEM3D Cloning into 'SPECFEM3D'... remote: Counting objects: 32888, done. remote: Total 32888 (delta 0), reused 0 (delta 0), pack-reused 32888 Receiving objects: 100% (32888/32888), 342.15 MiB | 9.82 MiB/s, done. Resolving deltas: 100% (24648/24648), done. Checking out files: 100% (3760/3760), done. pacman12 % cd SPECFEM3D/ pacman12 % git status .
On branch master
Changes not staged for commit:
(use "git add
..." to update what will be committed) (use "git checkout --
..." to discard changes in working directory) #
modified: EXAMPLES/fault_examples/tpv102/TPV102.py
modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h
modified: src/specfem3D/update_displacement_scheme.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git remote add upstream https://github.com/geodynamics/specfem3d.git pacman12 % git fetch upstream From https://github.com/geodynamics/specfem3d
- [new branch] devel -> upstream/devel
- [new branch] master -> upstream/master pacman12 % git checkout --track origin/devel error: Your local changes to the following files would be overwritten by checkout: src/specfem3D/update_displacement_scheme.f90 Please, commit your changes or stash them before you can switch branches. Aborting pacman12 %
On Sun, Mar 27, 2016 at 1:37 PM, David Luet notifications@github.com wrote:
Hi Carl, Yes my remotes look different because this is after hub created the fork. The part I don't understand is why you have code changes right after you cloned. What happens if you run: $ git diff src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c $ git diff utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
There are some instructions on how to use git instead of hub:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics More precisely, you can start at that point:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository If you decide to go that way, which I think you should, make sure you unalias git. Best, David
On Sun, Mar 27, 2016 at 2:13 PM, Carl Tape notifications@github.com wrote:
Hi David, thanks for trying this from scratch. I have copied my output below. I guess the disturbing thing is that you and I reach different outcomes with the same instructions. (Do you see the modified files like I do?) I deleted my fork of specfem3d on the gihub website. I am starting this all from a clean directory. I get the same outcome as before -- with no fork possible from the command line.
Our git versions are slightly different, but we will have bigger issues if this is the problem. The git version with the centos 6 distribution is 1.7.1, so we already require something more recent than that. I'm using 1.8.2.3 on our cluster.
Your remotes look different from mine. Maybe that is after you forked, not before (like mine).
Do you think it would be worth trying to establish some instructions that start with forking from the github website? This seems like a trivial first move. Though of course I'd like to understand why I cannot achive what you are achieving from the command line.
pacman12 % ls pacman12 % git --version git version 1.8.2.3 hub version 2.2.3 pacman12 % git clone geodynamics/specfem3d Cloning into 'specfem3d'... remote: Counting objects: 32888, done. remote: Compressing objects: 100% (32/32), done. remote: Total 32888 (delta 5), reused 0 (delta 0), pack-reused 32856 Receiving objects: 100% (32888/32888), 342.19 MiB | 2.20 MiB/s, done. Resolving deltas: 100% (24625/24625), done. Checking out files: 100% (3760/3760), done. pacman12 % ls specfem3d pacman12 % cd specfem3d/ pacman12 % git status . On branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
# modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c modified: utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git checkout -b devel origin/devel Checking out files: 100% (1027/1027), done. M src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c M utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90 Branch devel set up to track remote branch devel from origin. Switched to a new branch 'devel' pacman12 % config_repo your_github_name pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
— You are receiving this because you commented. Reply to this email directly or view it on GitHub <
https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202116558
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub < https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202148902
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202241752
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
Hi David,
Yes, the problems with the changed files occur immediately after I clone my fork. I copied the instructions in my post; the only difference is that my clone command is this (following the wiki):
git clone https://github.com/carltape/specfem3d.git SPECFEM3D
I will try the git reset approach and keep moving.
Thanks, Carl
On Mon, Mar 28, 2016 at 4:09 AM, David Luet notifications@github.com wrote:
At what point do you see the problems with the changed files. Is it right after you clone your fork? i.e. after you do: $ rm -Rf specfem3d $ git clone git@github.com:carltape/specfem3d.git $ cd specfem3d $ git status
On Mon, Mar 28, 2016 at 8:00 AM, David Luet luet@princeton.edu wrote:
Hi Carl, This is strange. Could you try on a different computer?
On Mon, Mar 28, 2016 at 1:34 AM, Carl Tape notifications@github.com wrote:
Hi David,
Thank you for pointing me to this new set of instructions:
https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository They are quite different from the other instructions I was trying before.
So I start by cloning from the website, as suggested. Then proceed (note: no hub) as shown below. Again I am encountering modified files from the clone. If I run "git diff" on any of these three files shown below, NOTHING is returned. So it's like a marked modified file that seems to have no modifications.
I repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
I again repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
So regarding these modified files -- which, for me, cause things to fail
perhaps I've just hit a github issue that is (widely?) known. Am I the only one on the planet that sees this? :) If so, I guess I can insert a [git reset --hard HEAD] and just keep going, but that kind of kludge does not inspire much confidence (in myself or in github).
Thanks, Carl
pacman12 % git --version git version 1.8.2.3 pacman12 % git clone https://github.com/carltape/specfem3d.git SPECFEM3D Cloning into 'SPECFEM3D'... remote: Counting objects: 32888, done. remote: Total 32888 (delta 0), reused 0 (delta 0), pack-reused 32888 Receiving objects: 100% (32888/32888), 342.15 MiB | 9.82 MiB/s, done. Resolving deltas: 100% (24648/24648), done. Checking out files: 100% (3760/3760), done. pacman12 % cd SPECFEM3D/ pacman12 % git status .
On branch master
Changes not staged for commit:
(use "git add
..." to update what will be committed) (use "git checkout --
..." to discard changes in working directory) #
modified: EXAMPLES/fault_examples/tpv102/TPV102.py
modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/vmesh.h
modified: src/specfem3D/update_displacement_scheme.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git remote add upstream https://github.com/geodynamics/specfem3d.git pacman12 % git fetch upstream From https://github.com/geodynamics/specfem3d
- [new branch] devel -> upstream/devel
- [new branch] master -> upstream/master pacman12 % git checkout --track origin/devel error: Your local changes to the following files would be overwritten by checkout: src/specfem3D/update_displacement_scheme.f90 Please, commit your changes or stash them before you can switch branches. Aborting pacman12 %
On Sun, Mar 27, 2016 at 1:37 PM, David Luet notifications@github.com wrote:
Hi Carl, Yes my remotes look different because this is after hub created the fork. The part I don't understand is why you have code changes right after you cloned. What happens if you run: $ git diff src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c $ git diff utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
There are some instructions on how to use git instead of hub:
More precisely, you can start at that point:
If you decide to go that way, which I think you should, make sure you unalias git. Best, David
On Sun, Mar 27, 2016 at 2:13 PM, Carl Tape notifications@github.com wrote:
Hi David, thanks for trying this from scratch. I have copied my output below. I guess the disturbing thing is that you and I reach different outcomes with the same instructions. (Do you see the modified files like I do?) I deleted my fork of specfem3d on the gihub website. I am starting this all from a clean directory. I get the same outcome as before -- with no fork possible from the command line.
Our git versions are slightly different, but we will have bigger issues if this is the problem. The git version with the centos 6 distribution is 1.7.1, so we already require something more recent than that. I'm using 1.8.2.3 on our cluster.
Your remotes look different from mine. Maybe that is after you forked, not before (like mine).
Do you think it would be worth trying to establish some instructions that start with forking from the github website? This seems like a trivial first move. Though of course I'd like to understand why I cannot achive what you are achieving from the command line.
pacman12 % ls pacman12 % git --version git version 1.8.2.3 hub version 2.2.3 pacman12 % git clone geodynamics/specfem3d Cloning into 'specfem3d'... remote: Counting objects: 32888, done. remote: Compressing objects: 100% (32/32), done. remote: Total 32888 (delta 5), reused 0 (delta 0), pack-reused 32856 Receiving objects: 100% (32888/32888), 342.19 MiB | 2.20 MiB/s, done. Resolving deltas: 100% (24625/24625), done. Checking out files: 100% (3760/3760), done. pacman12 % ls specfem3d pacman12 % cd specfem3d/ pacman12 % git status . On branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
# modified: src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c modified: utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90
# no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git checkout -b devel origin/devel Checking out files: 100% (1027/1027), done. M src/decompose_mesh/scotch_5.1.12b/src/libscotch/dgraph_io_load.c M utils/adjoint_sources/traveltime/create_adjsrc_traveltime.f90 Branch devel set up to track remote branch devel from origin. Switched to a new branch 'devel' pacman12 % config_repo your_github_name pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
— You are receiving this because you commented. Reply to this email directly or view it on GitHub <
https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202116558
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub <
https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202148902
— You are receiving this because you commented. Reply to this email directly or view it on GitHub < https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202241752
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-202358289
Okay, two last(?) comments on this. David and Elliott, thanks for your help on this.
Below are the instructions that worked for me. I needed to add the reset command to overcome the issue with the modified-but-not-modified files, an issue that is present for me from linux with git 1.8.2.3 but not present from my mac with git 2.5.4. Maybe this is unique to our group and not relevant to others.
From github delete the specfem3d fork to carltape, then refork from here https://github.com/geodynamics/specfem3d
pacman12 % git --version
git version 1.8.2.3
pacman12 % git clone https://github.com/carltape/specfem3d.git SPECFEM3D
Cloning into 'SPECFEM3D'...
remote: Counting objects: 32888, done.
remote: Total 32888 (delta 0), reused 0 (delta 0), pack-reused 32888
Receiving objects: 100% (32888/32888), 342.15 MiB | 521 KiB/s, done.
Resolving deltas: 100% (24648/24648), done.
Checking out files: 100% (3760/3760), done.
pacman12 % cd SPECFEM3D/
pacman12 % git status .
.# On branch master
.# Changes not staged for commit:
.# (use "git add
then git add, git commit to make local changes
pacman12 % git status . .# On branch devel .# Your branch is ahead of 'origin/devel' by 1 commit. .# (use "git push" to publish your local commits) .# nothing to commit, working directory clean
pacman12 % git push origin devel Counting objects: 15, done. Delta compression using up to 12 threads. Compressing objects: 100% (8/8), done. Writing objects: 100% (8/8), 1.40 KiB, done. Total 8 (delta 6), reused 0 (delta 0) To https://github.com/carltape/specfem3d.git 52e716f..80aa38f devel -> devel
then go here https://github.com/carltape/specfem3d click "Compare & pull request" review changes, then "Create pull request" [note: might want to write a description for the pull request]
Hi David,
It seems like there are two set of instructions, both aimed at people who could be committing changes into the main repository:
(1) https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM (2) https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository
option (1) seem much more complicated (install hub, run config_repo, etc) and did not work for me (the fork failed -- I don't think it had to do with the modified files either) option (2) seem simpler and worked for me
I do not see the reasoning for having both, but I am also a novice with git and github. If you think things are good as is, then please close this issue.
Thanks, Carl
Hi Carl, Ultimately it's not my decision. Some people find hub easier to use. I think it's, in part, because hub let's you open pull-request from the command line. It also knows where to push and where to pull. I agree that the title of the page about using git instead of hub could be improved. It makes using plain git more scary than it is. Even though I am the original author, the intension was for the wiki to be a community effort so I don't mind if someone wants to improve it. @ komatits What do you think Dimitri?
Carl, what is the version of the OS that is installed on the machine where you have problems (distro+version)? I may try to reproduce the problem on a VM.
Thanks, David
On Tue, Mar 29, 2016 at 1:39 PM, Carl Tape notifications@github.com wrote:
Hi David,
It seems like there are two set of instructions, both aimed at people who could be committing changes into the main repository:
(1) https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM (2) https://github.com/geodynamics/specfem3d/wiki/FOR-ADVANCED-USERS-ONLY---PLEASE-DO-NOT-USE-UNLESS-YOU-KNOW-WHAT-YOU-ARE-DOING---Advanced-Git-Topics#fork-a-repository
option (1) seem much more complicated (install hub, run config_repo, etc) and did not work for me (the fork failed -- I don't think it had to do with the modified files either) option (2) seem simpler and worked for me
I do not see the reasoning for having both, but I am also a novice with git and github. If you think things are good as is, then please close this issue.
Thanks, Carl
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-203020050
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
I repeated the entire steps from scratch (delete fork, new fork, clone, etc). This time, it shows a DIFFERENT set of two modified files, both of which show nothing with "git diff".
This is very odd; can you try git diff --git <modified file>
after cloning? I know there are no textual changes, but maybe some permissions are different?
Hi all,
hub is good. Let us not change the current process, it already took people months to get used to it and now it is working fine
thanks cheers
Dimitri
On 29/03/2016 19:56, David Luet wrote:
Hi Carl, Ultimately it's not my decision. Some people find hub easier to use. I think it's, in part, because hub let's you open pull-request from the command line. It also knows where to push and where to pull. I agree that the title of the page about using git instead of hub could be improved. It makes using plain git more scary than it is. Even though I am the original author, the intension was for the wiki to be a community effort so I don't mind if someone wants to improve it. @ komatits What do you think Dimitri?
Carl, what is the version of the OS that is installed on the machine where you have problems (distro+version)? I may try to reproduce the problem on a VM.
Thanks, David
On Tue, Mar 29, 2016 at 1:39 PM, Carl Tape notifications@github.com wrote:
Hi David,
It seems like there are two set of instructions, both aimed at people who could be committing changes into the main repository:
(1) https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM (2)
option (1) seem much more complicated (install hub, run config_repo, etc) and did not work for me (the fork failed -- I don't think it had to do with the modified files either) option (2) seem simpler and worked for me
I do not see the reasoning for having both, but I am also a novice with git and github. If you think things are good as is, then please close this issue.
Thanks, Carl
— You are receiving this because you commented. Reply to this email directly or view it on GitHub
https://github.com/geodynamics/specfem3d/issues/736#issuecomment-203020050
David Luet Linux Administrator/Software & Programming Analyst Department of Geosciences & PICSciE Princeton University
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-203026611
Dimitri Komatitsch CNRS Research Director (DR CNRS), Laboratory of Mechanics and Acoustics, UPR 7051, Marseille, France http://komatitsch.free.fr
Sorry, I was thinking of hg
; try git diff --stat
or git diff --summary
. Are the modified files consistent between calls to git status
?
Maybe also see if there are differences between git config --list
on the working and non-working machines?
I don't see anything with the stat or summary flags. The clone below was done using git 2.3.0. I'm left to believe that this is somehow related to our cluster, since no one else using specfem seems to have encountered this. It doesn't seem to be related to the git version.
pacman12 % git status .
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add
modified: EXAMPLES/fault_examples/tpv102/DATA/FAULT_STATIONS
modified: utils/ADJOINT_TOMOGRAPHY_TOOLS/mtadj/Makefile
no changes added to commit (use "git add" and/or "git commit -a") pacman12 % git diff --stat EXAMPLES/fault_examples/tpv102/DATA/FAULT_STATIONS pacman12 % git diff --summary EXAMPLES/fault_examples/tpv102/DATA/FAULT_STATIONS pacman12 % git --version git version 2.3.0
On Tue, Mar 29, 2016 at 2:34 PM, Elliott Sales de Andrade < notifications@github.com> wrote:
Sorry, I was thinking of hg; try git diff --stat or git diff --summary. Are the modified files consistent between calls to git status?
Maybe also see if there are differences between git config --list on the working and non-working machines?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/geodynamics/specfem3d/issues/736#issuecomment-203140130
Fixed by David @luet.
I'm trying to commit changes to the specfem3d repository. I am starting from these instructions: https://github.com/geodynamics/specfem3d/wiki/Using-Git-for-SPECFEM These instructions do not seem to work for me. I regularly use github for other repos (and from this cluster), though I'm not at all a git master. Somehow something is different with my setup of specfem3d. Please let me know if you have suggestions. Thanks. ///////////////////////// As of 2016-03-24, these do not work using this versions of git and hub:
pacman12 % git --version git version 1.8.2.3 hub version 2.2.3
Here is the first error, following a clone of the specfem3d repository:
pacman12 % git checkout -b devel origin/devel error: Your local changes to the following files would be overwritten by checkout: utils/EXTERNAL_CODES_coupled_with_SPECFEM3D/AxiSEM_for_SPECFEM3D/VM_examples_to_actualise/prem/run_specfem3D/set_path_and_params.sh Please, commit your changes or stash them before you can switch branches. Aborting
I do not know what these modified files are (the repo should be clean). But one fix is this:
git reset --hard HEAD git checkout -b devel origin/devel
Then there are also modified files listed in the devel repo:
pacman12 % git status . .# On branch devel .# Changes not staged for commit: .# (use "git add..." to update what will be committed)
.# (use "git checkout -- ..." to discard changes in working directory)
.#
.# modified: src/decompose_mesh/module_mesh.f90
.# modified: utils/EXTERNAL_CODES_coupled_with_SPECFEM3D/AxiSEM_for_SPECFEM3D/AxiSEM_modif_for_coupling_with_specfem/SOLVER/submit_sb.csh
.#
no changes added to commit (use "git add" and/or "git commit -a")
Again, I do this to get rid of these apparent modifications:
git reset --hard HEAD pacman12 % git status . .# On branch devel nothing to commit, working directory clean
The next issue is that the command "git fork" does not work as is
pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
This might involve an issue with the remote origin
pacman12 % git remote -v origin https://github.com/geodynamics/specfem3d.git (fetch) origin https://github.com/geodynamics/specfem3d.git (push)
First attempt to change the remote origin
git remote set-url origin https://carltape@github.com/geodynamics/specfem3d.git
git fork still fails:
pacman12 % git remote -v origin https://carltape@github.com/geodynamics/specfem3d.git (fetch) origin https://carltape@github.com/geodynamics/specfem3d.git (push) pacman12 % git fork Error creating fork: Unauthorized (HTTP 401) Bad credentials
The fix is to create a fork from the specfem github page (click "Fork"): https://github.com/geodynamics/specfem3d
I resume with the same repository that was cloned above. The only thing I do is reset the remotes:
pacman12 % git remote rename origin upstream pacman12 % git remote add origin https://carltape@github.com/geodynamics/specfem3d.git pacman12 % git remote -v origin https://carltape@github.com/geodynamics/specfem3d.git (fetch) origin https://carltape@github.com/geodynamics/specfem3d.git (push) upstream https://carltape@github.com/geodynamics/specfem3d.git (fetch) upstream https://carltape@github.com/geodynamics/specfem3d.git (push)
I then make a couple changes in the repository (git add, git commit), then commit them to my local version. Then try to push the changes to my forked repository:
pacman12 % git push error: The requested URL returned error: 403 Forbidden while accessing https://carltape@github.com/geodynamics/specfem3d.git/info/refs?service=git-receive-pack fatal: HTTP request failed pacman12 %
This error is ubiquitous among github users, and some suggested solutions are here:
https://help.github.com/articles/https-cloning-errors/
I don't see what to try.