class-codes-piaic-q3 icon indicating copy to clipboard operation
class-codes-piaic-q3 copied to clipboard

Assignment Submission Method

Open ehsan5505 opened this issue 2 years ago • 8 comments

Here are the instructions that would need to be followed (Update Version)

  1. Clone remote repository to setup the repository in your local system (this would also help to upload the changes [assignment] you want to contribute) git clone https://github.com/mohammadrajabraza/class-codes-piaic-q3.git
  2. Change the directory to the repository folder cd class-codes-piaic-q3
  3. Checkout new local branch (branch name example: assign1/rajabraza-123456) git checkout -b assign1/<your-name>-<PIAIC-id>
  4. Create a new project cargo new assignment_1
  5. Add the assignment code in the main.rs file
  6. Add the README.md for the explanation
  7. Stage the changes from working directory git status add
  8. Commit the staged changes with the exact commit message git commit -m "assign1: add assignment 1 solution"
  9. Push the local branch to the remote repo git push origin <your local branch name> (e.g. assign1/rajabraza-123456)

ehsan5505 avatar Aug 15 '21 11:08 ehsan5505

Thank you!

ehsan5505 avatar Aug 15 '21 11:08 ehsan5505

For visibility, i have to open it

ehsan5505 avatar Aug 15 '21 11:08 ehsan5505

Thanks Ehasn for your efforts. But I have a suggestion, wouldn't it be good if you also describe what's happening in the step? (e.g. 1. Cloning a remote repository we are intended to contribute in, git clone .... 2. Getting into the directory, cd class-code..... 3. Creating a local branch also checking it out, git checkout -b etc)

Additionally no need of step 5 (i.e. adding .gitignore, since its available in the repo globally)

mohammadrajabraza avatar Aug 15 '21 12:08 mohammadrajabraza

@mohammadrajabraza I think you have already clarified the objective, just add minor tweaks, hope this would help the team!, thanks again for the valuable suggestion.

ehsan5505 avatar Aug 16 '21 20:08 ehsan5505

origin assign1/usmanali-piaic141544 Username for 'https://github.com': uxman051 Password for 'https://[email protected]': remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: unable to access 'https://github.com/mohammadrajabraza/class-codes-piaic-q3.git/': The requested URL returned error: 403

yeh error aata hey sir kiya karoon ab

uxman051 avatar Aug 20 '21 18:08 uxman051

Sir is it closed? as i try to push it gives error 403 permission denied

usmanbhatti1947 avatar Aug 21 '21 19:08 usmanbhatti1947

Here are the instructions that would need to be followed (Update Version)

1. Clone remote repository to setup the repository in your local system (_this would also help to upload the changes [assignment] you want to contribute_)
   `git clone https://github.com/mohammadrajabraza/class-codes-piaic-q3.git`

2. Change the directory to the repository folder
   `cd class-codes-piaic-q3`

3. Checkout new local branch (branch name example: **assign1/rajabraza-123456**)
   `git checkout -b assign1/<your-name>-<PIAIC-id>`

4. Create a new project
   `cargo new assignment_1`

5. Add the assignment code in the main.rs file

6. Add the README.md for the explanation

7. Stage the changes from working directory
   `git status add`

8. Commit the staged changes with the exact commit message
   `git commit -m "assign1: add assignment 1 solution"`

9. Push the local branch to the remote repo
   `git push origin <your local branch name>` (e.g. **assign1/rajabraza-123456**)

Thanks Ehsan. A quick question please. Since we are pushing a local branch over to a cloned remote repo, we would need authorization to push this branch over to Rajab's repo. If Rajab has not added our Git user ids to his repo as contributors, we may not be able to push anything to his Public Repo.

The last step puts me into Git login shell:

jalal$ git push origin Assignment-01-Jalal-PIAIC123XXXX Username for 'https://github.co:

If i put my git credentials, login fails. I suspect it is because Rajab has not added my git login name to his repo: Jalal-PIAIC123XXXX. Is this a correct inference?

Jalal.

jalal-PIAIC124538 avatar Aug 22 '21 04:08 jalal-PIAIC124538

origin assign1/usmanali-piaic141544 Username for 'https://github.com': uxman051 Password for 'https://[email protected]': remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: unable to access 'https://github.com/mohammadrajabraza/class-codes-piaic-q3.git/': The requested URL returned error: 403

yeh error aata hey sir kiya karoon ab

Boss you need to generate a token For login. Git Hub no longer supports Passwords. To Generate a token for logn, click on your github login icon/image (top right corner) > go to Settings > Next Go to Developer Settings > Then Personal Access Tokens - Select the options and Generate.

Once you have the token, login form your CLI as follows when prompted whilst using git push: login: https://@github.com/userName/repo.git

Thanks Jalal

jalal-PIAIC124538 avatar Aug 22 '21 05:08 jalal-PIAIC124538